我在堆栈溢出时发现了几个pip问题,但不幸的是,我遇到了一些我找不到的问题。 特别是每当我尝试使用pip时,我都会收到以下错误消息:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 9, in <module>
load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
File "build/bdist.macosx-10.5-intel/egg/pkg_resources.py", line 357, in load_entry_point
"""Yield named metadata resource as list of non-blank non-comment lines
File "build/bdist.macosx-10.5-intel/egg/pkg_resources.py", line 2394, in load_entry_point
except ValueError:
File "build/bdist.macosx-10.5-intel/egg/pkg_resources.py", line 2108, in load
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/__init__.py", line 10, in <module>
from pip.backwardcompat import u, walk_packages, console_to_str
ImportError: cannot import name walk_packages
有谁知道什么是错的? 到目前为止,我已尝试按照此处的建议重新安装pip:Python mechanize module not found并且我也尝试了此Pip using system python osx,但其中没有一个适用于我。
提前感谢您的任何建议。
答案 0 :(得分:9)
以某种方式通过命令sudo easy_install -U pip