Updating pip and setuptools in homebrew does not work

拈花ヽ惹草 提交于 2020-01-01 15:07:11

问题


After brew install python, the following comes up:

Pip and setuptools have been installed. To update them
  pip2 install --upgrade pip setuptools

Running pip2 install

pip2 install --upgrade pip setuptools
Traceback (most recent call last):
  File "/usr/local/bin/pip2", line 11, in <module>
    load_entry_point('pip==9.0.1', 'console_scripts', 'pip2')()
  File "/Users/user1/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 564, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/user1/Library/Python/2.7/lib/python/site-packages/pkg_resources/__init__.py", line 2661, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group, name),))
ImportError: Entry point ('console_scripts', 'pip2') not found

回答1:


I was running into this after upgrading from Python 2.7.13 to 2.7.14 using Homebrew. I used the suggestion found in this issue on GitHub: https://github.com/pyenv/pyenv/issues/739 and it worked for me. The actual command I ran was:

/usr/local/Cellar/python/2.7.14/bin/python2 -m pip install --upgrade --force-reinstall pip

Good luck.



来源:https://stackoverflow.com/questions/45496082/updating-pip-and-setuptools-in-homebrew-does-not-work

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