When you install Python on macOS or Windows and follow our recommendations, pip installs with the interpreter. On Ubuntu, you have to install it separately with this command:
sudo apt update sudo apt install python3-pip
You can call pip directly with the
pip command, but it is better to use a longer one. It guarantees to bring up the latest installed pip version for the desired version of Python.
So, let us call pip:
python3 -m pip --version pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
When showing its version, pip also tells you where it locates and what version of Python it runs on.
Note the structure of the command we called. This command means «
python3, run the
-m module named
pip as a program with the
If you later see commands like
pip help in the pip documentation, you can call
python3 -m pip help. The result will be the same.