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
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
.