Easy_install and pip broke: pkg_resources.DistributionNotFound: distribute==0.6.36

不打扰是莪最后的温柔 提交于 2019-11-28 03:27:41
Ankur_Jatt

If you do this then it will work:

cd /usr/local/lib/python2.7/site-packages && ls

Find 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

Install the distribute package as follows:

$ wget https://svn.apache.org/repos/asf/oodt/tools/oodtsite.publisher/trunk/distribute_setup.py
$ python distribute_setup.py

You will have a working easy_install then.

Happy Coding.

None of the other answers worked for me. It was much simpler with these instructions. I had installed an extra copy of easy_install at /usr/local/bin/easy_install and /usr/local/bin/easy_install-2.7. I am pretty sure I did so following instructions here and in other places. The solution for me was to delete these two instances:

rm /usr/local/bin/easy_install
rm /usr/local/bin/easy_install-2.7

and then reinstall pip with

sudo easy_install --upgrade pip

Some background: I got to this point after having to reinstall OSX.

Wich operative system ?

Anyways you should try to do this:

sudo easy_install -U distribute

Maybe this is helpfull too, whit this you install easy_install-2.7:

wget --no-check-certificate http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz
tar xf distribute-0.6.35.tar.gz
cd distribute-0.6.35
python2.7 setup.py install

Maybe you need to force an update, or reinstall easy_install, because it seems is your problem.

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!

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.

  1. Get the get-pip.py file which is linked from https://pip.pypa.io/en/stable/installing/
  2. Using the old version of python executable (I assume it should be the 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.

I was in the middle of migrating from OSX system python to homebrew python, and was having the same error. Upgrading the homebrew python version (running brew upgrade python) did the thing for me.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!