Hi i am trying to install python2.7.6 on my 16.04 cloud image. Its giving the following on - apt install python=2.7.6

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python

1 Answer 1


Use the following command instead:

sudo apt-get install python-minimal

This will give you the most recommended python version 2.7.12. But if you must install 2.7.6 then do the following:

wget  https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar xf Python-2.7.6.tgz
cd Python-2.7.6
sudo make install

You can switch between different versions using:

sudo update-alternatives --config python

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .