gpt4 book ai didi

python - 升级到 OS X Yosemite 后 pip 不起作用

转载 作者:太空狗 更新时间:2023-10-29 21:22:12 26 4
gpt4 key购买 nike

升级到 Yosemite 后,我的 pip 不再工作了。如果我发出一个 pip 命令,它会这样提示:

Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.6', 'console_scripts', 'pip')()
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 356, in load_entry_point
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 2476, in load_entry_point
File "build/bdist.macosx-10.9-x86_64/egg/pkg_resources.py", line 2190, in load
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 10, in <module>
from pip.util import get_installed_distributions, get_prog
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 18, in <module>
from pip._vendor.distlib import version
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/distlib/version.py", line 14, in <module>
from .compat import string_types
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/_vendor/distlib/compat.py", line 31, in <module>
from urllib2 import (Request, urlopen, URLError, HTTPError,
ImportError: cannot import name HTTPSHandler

我试过 sudo easy_install -U pip 但没有成功。

最佳答案

听起来你正在尝试使用 homebrew 安装的 python 版本运行 pip

您可能想尝试让您的 homebrow 重新启动并运行。

关于python - 升级到 OS X Yosemite 后 pip 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26458671/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com