Why is PIP raising an AssertionError on pip freeze?

前端 未结 7 525
耶瑟儿~
耶瑟儿~ 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:14

    First, I ran Martin Mohan's solution:

    /usr/local/bin/pip uninstall pip
    apt-get remove python-pip
    apt-get install python-pip
    

    Then, boredcoding's ultimately fixed the problem, both solutions are found near bottom of thread: I screwed up the system version of Python Pip on Ubuntu 12.10

    $apt-get install python-pip
    $which pip
    /usr/bin/pip
    
    $pip install -U pip
    $which pip
    /usr/bin/pip
    
    $hash -r
    $which pip
    /usr/local/bin/pip
    

    The logic behind these two fix are stated in the thread (linked above), so I will refrain from going into each here.

提交回复
热议问题