I was tried to upgrade pip with pip install --upgrade pip
on OSX and pip and easy_install both dont work.
When running pip
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 2881, in <module>
parse_requirements(__requires__), Environment()
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 596, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==1.3.1
When running easy_install
File "/usr/local/bin/easy_install", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 2881, in <module>
parse_requirements(__requires__), Environment()
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/distribute-0.6.49-py2.7.egg/pkg_resources.py", line 596, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: distribute==0.6.36
How can I fix this?
UPDATE I found the solution.
I did cd /usr/local/lib/python2.7/site-packages && ls
found pip-1.4.1-py2.7.egg-info
and distribute-0.6.49-py2.7.egg
in the directory.
Then the following steps fixed the issue.
Changed the pip version to 1.4.1 in
/usr/local/bin/pip
Changed distribute version to 0.6.49 in
/usr/local/bin/easy_install
The answers on other such questions to curl ez_setup.py and install setuptools from it didnt work. It gave the following error.
Downloading https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.6.tar.gz
Traceback (most recent call last):
File "<stdin>", line 370, in <module>
File "<stdin>", line 366, in main
File "<stdin>", line 278, in download_setuptools
File "<stdin>", line 185, in download_file_curl
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 542, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['curl', 'https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.6.tar.gz', '--silent', '--output', '/usr/bin/setuptools-1.1.6.tar.gz']' returned non-zero exit status 23
It seems that pip was installed with reference to a new version of python, while your active python executable is still old. In case you want to keep the older version of python, it's pretty straightforward: reinstall pip using the old version.
get-pip.py
file which is linked from https://pip.pypa.io/en/stable/installing/python
command), run the script.If you're looking for a shortcut:
cd /tmp/ && wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
The script removes old versions of pip and properly installs a new executable, linking to the old python's executable environment.
Just Pointing it out here once again to make the solution more obvious!
Just running the command
sudo easy_install --upgrade pip
solved the issue for me!Install the distribute package as follows:
You will have a working
easy_install
then.Happy Coding.
One way to solve distributeNotFound error is to download the python module with exact version. Uncompress it, go to the folder and install it "python setup.py install". Then, may be upgrade it to the latest version.
I had the error 'pkg_resources.DistributionNotFound: The 'setuptools==19.4' distribution was not found and is required by the application'. I downloaded setuptools v 19.4, when v 36.2.7 is already out. I installed v 19.4 and then upgraded with command "easy_install --upgrade setuptools'. Everything worked like charm thereafter.
If you do this then it will work:
Find
pip-1.4.1-py2.7.egg-info
anddistribute-0.6.49-py2.7.egg
in the directory.Then the following steps fixed the issue:
/usr/local/bin/pip
/usr/local/bin/easy_install
Wich operative system ?
Anyways you should try to do this:
Maybe this is helpfull too, whit this you install easy_install-2.7:
Maybe you need to force an update, or reinstall easy_install, because it seems is your problem.