Why is PIP raising an AssertionError on pip freeze?

前端 未结 7 517
耶瑟儿~
耶瑟儿~ 2020-12-14 14:32

My console:

desarrollador@desarrollador-HP-14-Notebook-PC1:~$ pip freeze  
Exception:  
Traceback (most recent call last):  
  File \"/usr/lib/python2.7/dist         


        
7条回答
  •  半阙折子戏
    2020-12-14 15:12

    It may be a bit late, but one thing I found was there are 2 or three versions of pip installed (depending on what you installed)

    pip - the OS version installed, freeze doesn't work and it can be out of date pip2 - the newer one installed but upgrading pip via pip etc pip3 - installed if you have python3 and python2 installed at the same time.

    You can either change which pip gets used in $PATH, or do what I did:

    pip2 freeze (which does work on ubuntu14 if you have more than one option for python)

提交回复
热议问题