安装pip后安装简单(在mac上)时出错

时间:2015-06-09 17:58:41

标签: python pip

我尝试通过简单安装下载pip,但安装完成后每当我在mac终端中输入pip时都会出现此错误:

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 8, in <module>
    load_entry_point('pip==7.0.3', 'console_scripts', 'pip')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 271, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 2173, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/pkg_resources.py", line 1906, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/Library/Python/2.5/site-packages/pip-7.0.3-py2.5.egg/pip/__init__.py", line 211
    except PipError as exc:
                     ^
SyntaxError: invalid syntax

当我尝试pip install pyopengl时,它会给我同样的错误。我该怎么做才能解决这个问题?

1 个答案:

答案 0 :(得分:1)

现代pip适用于Python 2.6及更高版本。看来你有Python 2.5,所以你需要升级Python或使用旧版本的pip。

根据the documentation,通过pip的v1.3.1支持Python 2.5。