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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.