How do you install pip for python3.9.4?

You can install pip for python3.9 using get-pip.py as the official documentation as well as the github page describes it:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.9 get-pip.py

This script will also place binaries in your ~/.local/bin, so you can optionally add this directory to PATH.

echo 'export PATH=~/.local/bin/:$PATH' >> ~/.bashrc
source ~/.bashrc

When you do that, you might want to remove ~/.local/bin/pip and ~/.local/bin/pip3 and only keep ~/.local/bin/pip3.9 to not replace the already available commands.


Finally, check the proper installation:

$ pip3.9 -V
pip 21.0.1 from /home/user/.local/lib/python3.9/site-packages/pip (python 3.9)