6

I am trying to install Keryx which requires python < 2.7

I want to be able to use this software and yet not uninstall the newer version of python from my system and mess up any other programs that might be using it.

How can I install the above in my current setup?

A similar question exists here but does not have a valid answer -

How can I downgrade Python or use many versions?

Kshitiz Sharma
  • 1,065
  • 4
  • 15
  • 33

1 Answers1

1

You can easily install Python 2.6 from the archives:

sudo apt-get install python2.6

Note 1: The default Python version (/usr/bin/python) will remain Python 2.7. To use version 2.6 you will need to use /usr/bin/python2.6 explicitly.

Note 2: Generally speaking, it is safe to install more than a version of the same software as long as you use packages provided by your distribution. If you want to install a version of a software not provided by the distribution, be sure to install it to /usr/local, or better use some isolation mechanisms (e.g. virtual environments/machines).

Andrea Corbellini
  • 15,616
  • 2
  • 64
  • 81
  • Not true. I'm using ubuntu 20.04 and wanted to install python3.5.2: issugin apt-get install python3.5.2 does not appear as possible option ... do you know how to solve it? – Lucas Aimaretto May 20 '20 at 16:35
  • @LucasAimaretto Python 3.5 is 5 years old. It's unlikely that it will be supported in latest Ubuntu release. Use a newer Python from the archives, or if you really want to use Python 3.5, then you'll have to compile and install manually – Andrea Corbellini May 21 '20 at 00:59
  • Yes, I'm in need of using some old python ... wondering about what's the best way of having those ... I believe compiling and installing manually is an option. Not sure then how to `pip install` for such a manual installation later on ... – Lucas Aimaretto May 21 '20 at 16:46