Python3 Pip3 Upgrade Error

Shit happen. I am using Ubuntu 14.04 with Python 3.5. Actually with pip3 version 10 or something. I forgot.

I try to install pytest. I read that I need to upgrade the pip3 to version 20. So I id.

#sudo pip install --upgrade

It worked nice. But when I check the version with pip –V, it went wrong.

Traceback (most recent call last):
File "/home/myuser/.local/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named 'pip._internal'

Or somewhere from line number xx. It frustated me. Then I found this in unix.stackexchange.com It is said about the version of the python3 I have. So re-install it must be done by this

#curl https://bootstrap.pypa.io/3.5/get-pip.py
#python3 get-pip.py --force-reinstall

Another forum suggested this, that is not working in 3.5, because it run in 3.6

#curl https://bootstrap.pypa.io/get-pip.py

When the pip is success, it will give the right result when runing pip3 –V

pip 20.3.4 from /home/sugi/.local/lib/python3.5/site-packages/pip (python 3.5)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.