Why is PIP raising an AssertionError on pip freeze

2019-01-22 17:05发布

My console:

desarrollador@desarrollador-HP-14-Notebook-PC1:~$ pip freeze
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/freeze.py", line 68, in run
req = pip.FrozenRequirement.from_dist(dist, dependency_links, find_tags=find_tags)
File "/usr/lib/python2.7/dist-packages/pip/init.py", line 156, in from_dist
assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

I installed the tornado package and this happened since. How can I fix it?

标签: pip
7条回答
干净又极端
2楼-- · 2019-01-22 18:10

The problem is due to an old version of pip being installed. Run the following command to install a new version of pip:

sudo easy_install -U pip. 
查看更多
登录 后发表回答