command "pip list" shows error

时间:2015-07-28 16:53:06

标签: python pip

I wanna do python but I cannot even configure it:D . So I installed pip on Linux Mint and when type in "pip list" an error shows up:

    Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 142, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 151, in output_package_listing
    if dist_is_editable(dist):
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 348, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 286, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

Storing debug log for failure in /home/skorab/.pip/pip.log

What is wrong with that? I wanna install modules for python2.7 and 3.4 seperately.. Thanks!

1 个答案:

答案 0 :(得分:1)

This worked for me.

pip install -U setuptools
pip install -U pip

I had to the relink pip.

ln -s /usr/local/bin/pip /usr/bin/pip