match problem between Python3 and pip3
#1
helloļ¼Œ

My Linux distribution is Ubuntu 18.04. I followed the commands $ pip --version and $ python3 --version to check if the Python3 and pip3 versions match. The result is:

Lee@lee:~$ pip --version
Pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

Lee@lee:~$ python3 --version
Python 3.6.7

The results obtained seem to imply that the two versions do not match, but I have run the following commands to make them match:

$ sudo python3 -m pip install --upgrade pip
$ sudo python3 -m pip install artifactory twisted prettytable sqlalchemy pyelftools openpyxl xlsxwriter pyyaml numpy configparser pyvcd

What is wrong with it?

PS: When I run pip3 --version, the result is:
Pip 19.0.3 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
Reply
#2
I really don't recommend changing your distribution's python via pip. What you are essentially doing by callingĀ 
Quote:sudo pip [...]

is circumenventing your package manager and putting your system in a weird state. What you should do instead is use pip's --user flag to install packages locally for your user.
Furthermore I think on ubuntu there is a difference between pip and pip3, so it makes no sense to compare pip with python3.

It doesn't look like you have a specific problem with your python installation so I don't know what to tell you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)