【问题标题】:Updating pip and setuptools in homebrew does not work在自制软件中更新 pip 和 setuptools 不起作用
【发布时间】:2023-03-14 05:48:01
【问题描述】:

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

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

【问题讨论】:

标签: python pip homebrew


【解决方案1】:

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

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

祝你好运。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-09-15
    • 2019-01-22
    • 1970-01-01
    • 2017-05-22
    • 2013-06-13
    • 2013-11-10
    • 2021-09-03
    相关资源
    最近更新 更多