Error after upgrading pip: cannot import name 'main'

后端 未结 30 2002
清歌不尽
清歌不尽 2020-11-22 15:51

Whenever I am trying to install any package using pip, I am getting this import error:

guru@guru-notebook:~$ pip3 install numpy
Traceback (most recent call l         


        
30条回答
  •  独厮守ぢ
    2020-11-22 16:27

    You can resolve this issue by reinstalling pip.

    Use one of the following command line commands to reinstall pip:

    Python2:

    python -m pip uninstall pip && sudo apt install python-pip --reinstall
    

    Python3:

     python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall
    

提交回复
热议问题