I've been trying out the examples from the IMDBPY website. They don't work. As a fix someone said "you have to install the repository version, without using easy_install or pip, until we've packaged a newer version."
I'm very new to Python. I'm not even sure what the repository version is, let alone how to install it. Could someone please explain? If it matters, I'm using Python 2.7.
"Someone" may have misled you slightly by saying:
... without using easy_install or pip
You may still use pip when installing the repository version. They probably meant to say that you can not install the current version from PyPI yet.
In your shell:
$ git clone https://github.com/alberanid/imdbpy.git
Then cd into the imdbpy directory (the directory where you have the setup.py file contained). Optionally create/activate a virtual environment, and then:
$ pip install .
Repository version means you will need to checkout their repository on Github or other Subversion system they are hosting the code on. For git, that means cloning the repository to your local machine.
Like so: git clone https://github.com/alberanid/imdbpy
Related
What is the main difference in installing a python package by pip install and python setup.py install using the file from GitHub repository?
From what I understand right now, I kinda have the feeling that using the second option you will install the repo in some sort of developer mode where you can do changes by directly operating in the files cloned by git repo. Is this correct? I would like to find out a proper explanation of this.
I am looking to download a Python library (specifically this one) from GitHub.
I had already downloaded it using pip install espnff but it appears changes have been made to it and the only way to get the updated version is through GitHub. I should also mention that I use Python with the Anaconda distribution, if that affects anything.
How do I download and update what I already have?
First, you should make sure that pip actually uses you anaconda python distribution, and not e.g. the one that comes as default on your OS. You can use which pip to do that.
After that, it is as easy as
pip install espnff --upgrade
If the latest changes have not yet been made available on pip, you could also try to install it manually from source. Taken from the repository you linked:
git clone https://github.com/rbarton65/espnff
cd espnff
python setup.py install
To make sure that you're installing the latest version available, you should use git pull to fetch and merge the latest changes before installing.
On some occasions, you might also have to delete the existing build directory first, or use
python setup.py build --force
python setup.py install
I recently installed python 2.7.2 on my Mac running OSX 10.6.8. Previously, I had version 2.6. I set my path in .bash_profile as follows:
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH
so that when I run python it will refer to my new installation. It does.
I would also like to use pip with my new installation, but the problem is that I already have the current version of pip installed at
/usr/local/bin/pip.
I tried to re-install pip with:
easy_install pip
But, of course this does not put pip in the desired new directory
/usr/local/share/python/pip
but simply refers to the existing version in /usr/local/bin/pip.
Can someone tell me how to fix this?
I would like to then use pip to install NumPy and SciPy in the correct directory (I was having trouble getting the SciPy installation to work with my old version of python, hence the new install).
If you'd like, you can visit the website where I found instructions for installing python 2.7, creating/updating my .bash_profile, installing pip, and NumPy and SciPy. Might provide some insight, or I'm happy to give more details if needed. Thanks!
http://www.thisisthegreenroom.com/2011/installing-python-numpy-scipy-matplotlib-and-ipython-on-lion/#python
Install distribute as per the instructions at http://pypi.python.org/pypi/distribute .
Make sure you specify the full path to the python executable (/usr/local/share/python/python or smth in your case).
$ curl -O https://svn.apache.org/repos/asf/oodt/tools/oodtsite.publisher/trunk/distribute_setup.py
$ /usr/local/share/python/python distribute_setup.py
Then you should have /usr/local/share/python/easy_install.
After that, run:
$ /usr/local/share/python/easy_install pip
Then you should have /usr/local/share/python/pip.
Depending on the ordering of things in your PATH, either your old, or the newly installed pip is executed when you execute the pip command, so you either might have to adapt your PATH, or specify the full path to /usr/local/share/python/pip when installing eggs.
(shameless plug:
In any case, you might consider using virtualenv for installing packages into a "project" specific isolated environment, as opposed to installing them globally.)
I needed to uninstall brew's python.
Then, I was left with python v2.7.6
Next to install, pip I ran
sudo easy_install pip
installed fine and working
I had a similar issue, try this:
$ python -m pip install --upgrade --force-reinstall pip
This will force reinstall pip with whatever version of python you use including installing the binary.
A few days ago I had a friend who was starting Python Programming and needed help with the same issue: installing pip. There are debates over which one to choose between easy_install and pip and it seems everybody is heading the pip direction. Either way, installing either of them can be frustrating.
You can use this simple tutorial : installing pip package manager the easy way
Here are what you should keep in mind as you follow the above guide:
If you already have an older version installed, uninstall it or totally remove the python installation
Once that is cleared, download an install Python.
After that, download ez_setup.py file and save it to your desktop - easily accessible from the command line
Now run it from the command line and it will install easy_install for you after which,
You can use it to install pip.
Once again, you can do this or use the above link to find a simple step-by-step guide on how to get it installed on your computer.
Good luck.
Just so that people knew, ATM we can install PIP by downloading get-pip.py from the page with docs and run it like this:
c:\python27\python.exe get-pip.py
BTW, Python 3.4 comes with PIP pre-installed.
One of the command line options lets you choose where to install to.
--install-dir (-d) install package to DIR
So something like - # easy_install pip -d /usr/local/share/python
(Please correct me if I'm wrong.)
Just wanted to say that I found a way to get around my problem. I don't know that I can explain it perfectly, since I am not very good at understanding what I am doing with this stuff just yet! But, the problem seems to have been with my PATH. I removed the PATH that I posted in my original question, and then used easy_install pip. It went straight to python 2.7.2 (my new version) with no problem. I then successfully used pip to install NumPy and SciPy in the correct location, and they both work. Thanks to ErikAllik and FakeRainBrigand for taking the time to look into it!
I'm trying to install a package from Github, using Pip, using the following syntax
pip install -e git+https://github.com/facebook/python-sdk.git#egg=FacebookSDK
and getting the error "cannot find command git". This Question has (unchecked) answers saying that Git needs to be installed on the system. However, this Answer states that "Git, Subversion, Bazaar and Mercurial are all supported" by Pip.
The Pip documentation also says it has "Native support for other version control systems (Git, Mercurial and Bazaar)".
So how do I install this package with Pip? I really don't want to install Git on my VPS. Or are there any non-Pip tools, for just pulling files from repositories (without doing a full Git install)?
Update - so I bit the bullet, and installed Git on my VPS. Pip still wasn't able to grab the package, but it was giving a different set of errors, so - progress. :) I finally did
git clone http://github.com/facebook/python-sdk.git
(note the http, not https), and manage to download the package, then just installed it manually.
If I'm not mistaken, you would need the git client to be install on your machine. In the event that you don't have git installed, try this:
pip install https://github.com/facebook/python-sdk/zipball/master
or
pip install https://github.com/facebook/python-sdk/tarball/master
You need to install the git-core, since the git:// protocol isn't associated with anything.
sudo apt-get install git-core
For Windows or none git users:
I first download and unpack the file.
Then in the python directory going to \Scripts
Starting here the command prompt (shift + rigth-click)
pip install C:\Theano-master
*# replace Theano-master with the path to your directory of your package
This morning, when I run python pip to install a pcakge from git has problems.
pip install git+https://github.com/gumblex/zhconv.git#egg=zhconv
Firstly get error msg:
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
Try pip install git
ERROR: Could not find a version that satisfies the requirement git
ERROR: No matching distribution found for git
When I find this question,tried answers from #Mridang Agarwalla not work for first one; for second cmd, there was "time out" to git site.
But when trying answer from #Martijn van Wezel, it is very successfully. Thanks! #Martijn van Wezel
My trying is:
download the Zip file i need from Git page and extract it to a folder.
https://github.com/gumblex/zhconv
extract the ZIP to my local folder: D:\gitPackageforinstall\zhconv
Then success by below cmd.
pip install D:\gitPackageforinstall\zhconv
Hope this could be a reference to others as an update for 20210419
I'm learning about PostgreSQL and had to install the windows version. It was suggested to use git+, and I was running to the same issues that John C was experiencing.
Martijn above recommended unpacking and downloading. That is also what the creators of win-psycopg suggested. So I thought I'd share their method for installing into a Virtual Environment.
Thank you stickpeople:
http://www.stickpeople.com/projects/python/win-psycopg/
To install into a virtual env:
I had a custom script programmed and it is using the authors own module that is hosted on Google code in a Mercurial repo. I understand how to clone the repo but this will just stick the source into a folder on my computer. Is there a proper way to add the module into my python install to make it available for my projects? (e.g. with modules hosted on pypi you can use virtualenv and pip to install).
Thanks
Dave O
In exactly the same way. Just pass the address of the repo to pip install, using the -e parameter:
pip install -e hg+http://code.google.com/path/to/repo
If the module isn't on pypi, clone the repository with Hg and see if there's a setup.py file. If there is, open a command prompt, cd to that directory, and run:
python setup.py install