I installed fresh Ubuntu 20.04 (which I believe comes with python3.8) and then additionally installed:
sudo apt install python3.9
sudo apt install python3.9-dev
sudo apt install python3-pip
I want to check what version of pip I’m running:
$ python3.8 -m pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
$ python3.9 -m pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.9)
Now, when I create a virtualenv (virtualenv TestProject_XYZ -p 3.9
) and activate it I get the following:
$ python3.9 -m pip --version
pip 23.2.1 from ~/.local/share/virtualenvs/TestProject_XYZ/lib/python3.9/site-packages/pip (python 3.9)
Question: I don't understand where virtualenv takes this version from (20.0.2 vs 23.2.1). I can't seem to find it anywhere in /usr/bin or /usr/lib
python3.9 -c 'import pip; print(pip)'