本文介绍了更新自制软件中的pip和setuptools不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

brew install python之后,出现以下内容:

After brew install python, the following comes up:

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

运行pip2安装

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

推荐答案

使用Homebrew从Python 2.7.13升级到2.7.14之后,我遇到了这个问题.我使用了在GitHub上此问题中发现的建议: https://github.com/pyenv/pyenv/Issues/739 ,它对我有用.我运行的实际命令是:

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

祝你好运.

这篇关于更新自制软件中的pip和setuptools不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 11:29
查看更多