3

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 Answers1

6

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
./configure
make
sudo make install

You can switch between different versions using:

sudo update-alternatives --config python
Eliah Kagan
  • 117,780
Dawoodjee
  • 681
  • I can't see how this will help - https://packages.ubuntu.com/search?keywords=python-minimal (2.7.12) – guiverc Jun 27 '18 at 08:55