Install Pip on ubuntu20.04 for Python2

Hello guys, I have trouble installing Python2 on my laptop. The OS is Ubuntu 20.04 LTS.

I’m following theses step: https://computingforgeeks.com/how-to-install-python2-with-virtualenv-on-ubuntu/

The issue is on the step where I should use the get-pip.py installation script “sudo python2 get-pip.py”. The script fails with this error message:

image

Any help will be appreciated!

The latest version of pip does not support Python 2.7, which has been at end-of-life for a year now. Instead, you’ll need to use the last version of pip that did support Python 2.7; you can use https://bootstrap.pypa.io/2.7/get-pip.py to get it.

But if at all possible, you’ll be better off upgrading to Python 3.8 or newer :slight_smile:

Ubuntu 20.04 ships with Python 3.8 by default. You can run it with the python3 command. Some tutorials might say to run python ... but just run python3 ... instead.