How to install pip with specific python version?

Viewed 248

I want to install python 3.6 with pip version of ~= 9.0.1 for an open source project/side project.

Or is there any way to create virtualenvironment using these versions?

I am using Ubuntu 20.04 LTS.

Thanks for help:)

1 Answers

Pip is itself a package, and you can specify a version when installing pip:

python -m pip install pip==9.0.1

Note that that is quite an old pip, and you may have problems.

At to getting python 3.6---you will have to install it yourself; there's probably a package. Make your virtual env first, and then fix the pip version. I've not used 3.6 for a long time, but I imagine this worked back then:

python3.6 -m venv venv
source venv/bin/activate.sh
# we are now in the venv
python -m pip install pip==9.0.1
Related