ImportError: Entry point ('console_scripts', 'pip') not found on Mac

南楼画角 提交于 2020-01-03 16:53:04

问题


I got the message

You are using pip version 8.0.2, however version 8.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

When I try to install a package through pip.

I followed the instruction and upgrade pip with pip install --upgrade pip. Now I'm getting an error with pip, even with pip --version to check the version of pip.

  Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==8.0.2', 'console_scripts', 'pip')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 357, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2393, in load_entry_point
    raise ImportError("Entry point %r not found" % ((group,name),))
ImportError: Entry point ('console_scripts', 'pip') not found

I've searched online and found some similar issues like, this, this and this. but none of the solutions worked for me.

I think it might be I have multiple version of pip on my Mac, how can I clean it up and get the latest version installed, please?

Thank you.


回答1:


Manually removed all pip repositories in /usr/local/bin/. (not sure if it's necessary.)

Then reinstall pip following the instructions here.

To install pip, securely download get-pip.py.

Then run the following:

python get-pip.py

FYI, easy-install pip doesn't work.



来源:https://stackoverflow.com/questions/38753907/importerror-entry-point-console-scripts-pip-not-found-on-mac

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