Error after upgrading pip: cannot import name 'main'

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

    resolved in one step only.

    I too faced this issue, But this can be resolved simply by 1 command without bothering around and wasting time and i have tried it on multiple systems it's the cleanest solution for this issue. And that's:

    For python3:- sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall.

    By this , you can simply install packages using pip3. to check use pip3 --version.

    For older versions, use : sudo python -m pip uninstall pip && sudo apt install python-pip --reinstall.

    By this, now you can simply install packages using pip. to check use pip --version.

提交回复
热议问题