pip3 is pointing to the wrong version of python

I have installed python3.8 and have found no reference on how to get pip3 to talk to it on ubuntu. On macos I had explicitly installed pip3.8 and that has been crucial to getting all packages lined up correctly.

pip3 was installed as follows based on numerous recommendations:

 sudo apt-get install python3-pip

But it is pointing to python3.6:

$ pip3 -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

Please do not suggest anaconda or venv: there are reasons we are using directly installed python3.8.

2

1 Answer

The best option is to use python3 -m pip to run pip with a specific python version.

The full docs on this are here:

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like