[FAQ] pip list 명령에서 AssertionError

[FAQ] pip3 list, AssertionError 에러

  • Q: pip3 list 명령에서 아래와 같이 AssertionError 에러가 납니다.
  • A: pip3 를 업그레이드 하세요.

pip3 list 명령에서 아래와 같이 AssertionError 에러가 난다면,

$ pip3 list
backports-abc (0.4)
beautifulsoup4 (4.4.1)

...(중략)...

Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 80, in run
    self.run_listing(options)
  File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 142, in run_listing
    self.output_package_listing(installed_packages)
  File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 151, in output_package_listing
    if dist_is_editable(dist):
  File "/usr/lib/python3/dist-packages/pip/util.py", line 366, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/usr/lib/python3/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/ubuntu/.pip/pip.log

다음과 같이 명령하여 update 하고, 다시 터미널을 실행한다. (pip를 최신버전으로 업데이트)

$ sudo pip3 install -U setuptools
$ sudo pip3 install -U pip

댓글

Comments powered by Disqus