Archive for April 2009

Installing Python 2.6 in Sidux/Debian/Ubuntu

Install Build Requirements

If you have the appropriate deb-src entries in your sources.list files, then you can do this:

apt-get build-dep python2.5

Replace 2.5 with the default version in your distro. Unfortunatly in sidux this wanted to install emacs (NEVAR!!!!) and remove my password manager (the unstable repo has been changing rapidly since the new debian release). I used this instead:

apt-get install build-essential blt-dev libbluetooth-dev libbz2-dev libdb4.5-dev
   libffi-dev libgdbm-dev libncurses5-dev libncursesw5-dev libreadline5-dev
   libsqlite3-dev libssl-dev tk8.4-dev

It worked for me, but the list may be incomplete.

Install Python, libraries, etc

See my article about installing 2.6 in Cent OS – most of it is distribution agnostic. To build/install psycopg2 you will probably need to install libpq-dev.

Installing Python 2.6 in CentOS 5 (or RHEL5)

CentOS 5 uses python 2.4, and replacing it is not really on option since yum and other core packages depend on it. My solution is to compile 2.6 and use /opt or /usr/local for the prefix. I also create a virtualenv with the new python executable, so when I’m in the environment 2.6 becomes the default python. It also isolates all my python libraries for a given project. Most of this article is actually distribution agnostic, and the yum build requirement install will likely work on other versions of CentOS and other RedHat derivatives like Fedora.

Continue reading ‘Installing Python 2.6 in CentOS 5 (or RHEL5)’ »