Install Old Python on Debian Jessie

Date: 2016/07/01
Categories: blog

My partner and me, new comers at BlankOn project, still struggling with irgsh, which stand for Insinyur Robot Gedek Sarjana Hukum. I’m really curious, how the most important sub project on BlankOn named like no other. irgsh is a package automation that rebrand and build packages for BlankOn Linux distribution.

The first line of code has been commited since 6 years ago, crafted with Python 2.6. We are planning to deploy new instance of irgsh on new machine. Before that, we should have a Python 2.6 installed (in this case, Python version 2.6.6). After hours of digging on Google Search result, Stackoverflow and so on, I succeeded install old Python 2.6 on Debian Jessie with the following steps :

Use pythonbrew

https://github.com/utahta/pythonbrew

If you tried to install a version of Python now, you will get failed because of some dead link in the pythonbrew script. I found this patch https://github.com/pybank/pythonbrew/pull/7/files which did not merged to the pythonbrew’s upstream repository.

Open ~/.pythonbrew/etc/config.cfg with your favorite editor and change http://python-distribute.org/distribute_setup.py to https://bitbucket.org/tarek/distribute/raw/default/distribute_setup.py.

Install dependencies

You need this following package :

Some of above packages are required specifically by irgsh-node, like the SSL libraries.

Install Python version 2.6.6 for the first time

Whether you succeeded or not, let ignore it for now. If succeeded, we have a Python that does not support HTTPS (irgsh-node needed it). Since we already have the source (~/.pythonbrew/pythons/dist/), remove the binary.

Add SSL support

Install again

Virtualenv

UPDATE

You should use https://github.com/yyuu/pyenv instead of pythonbrew. More simple, less bugs. (doh)



>> Home