0

我正在尝试安装 pip。我遇到了一个问题,我不知道如何解决它。

我已经激活了我的 virtualenv。

当我运行 $ pip 时,我得到命令列表,但是当我运行 $ pip list 时,我得到以下响应。

distribute (0.6.28)
pip (1.4.1)
Exception:
Traceback (most recent call last):
  File "/Users/Marcus/Documents/Django/venv/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/Users/Marcus/Documents/Django/venv/lib/python2.7/site-    packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/Users/Marcus/Documents/Django/venv/lib/python2.7/site-    packages/pip/commands/list.py", line 127, in run_listing
    self.output_package_listing(installed_packages)
  File "/Users/Marcus/Documents/Django/venv/lib/python2.7/site-packages/pip/commands/list.py", line 136, in output_package_listing
    if dist_is_editable(dist):
  File "/Users/Marcus/Documents/Django/venv/lib/python2.7/site-packages/pip/util.py", line 347, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/Users/Marcus/Documents/Django/venv/lib/python2.7/site-packages/pip/__init__.py", line 194, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

Storing complete log in /Users/Marcus/.pip/pip.log

谢谢

4

1 回答 1

1

尝试GitHub 上建议的解决方案:

当您使用 http://python-distribute.org/distribute_setup.py脚本安装分发时会发生这种情况。运行 pip install -U Distribute 可以解决问题。该错误仅在 pip==1.4 中重现。

于 2013-08-30T23:06:01.340 回答