Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install python 2.7 on ubuntu 18.04

is there a way to install Python 2.7 on Ubuntu 18.04? I tried this command but it isn't working.

sudo apt install python-minimal

Is there a way to install it manually? I try python 2.7 for a software that didn't support python 3.

Thanks!

like image 917
Kevin Jedynak Avatar asked Jan 07 '20 16:01

Kevin Jedynak


People also ask

Does Ubuntu 18 have Python 2?

Objective. Python version 3 is now the default python interpreter on Ubuntu 18.04 Desktop or Server release. However, if you need to install the older Python 2 version you can do that with a single apt command.


2 Answers

Run these commands to ensure your repositories are up to date before installing

sudo apt update
sudo apt upgrade
sudo apt install python2.7

Then to install pip for python 2:

sudo apt install python-pip
like image 93
Spiff Avatar answered Oct 10 '22 22:10

Spiff


As my comment has solved the issue, I will develop it a little more in this answer for further reference.

Try using aptitude, it better manage conflicting packages for you:

sudo aptitude install python-minimal

Reference: https://askubuntu.com/a/451078/1006720

like image 34
Jona Avatar answered Oct 10 '22 22:10

Jona