Error after upgrading pip: cannot import name 'main'

后端 未结 30 2082
清歌不尽
清歌不尽 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:19

    This Worked for me !

    hash -r pip # or hash -d pip
    

    Now, uninstall the pip installed version and reinstall it using the following commands.

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

    If pip is broken, use:

    python -m pip install --force-reinstall pip
    

    Hope it helps!

提交回复
热议问题