The Story from Proteus's Productivity seeker

Proper install guide

I try to install psycopg2 (2.4.1 bcoz 2.4.2 does not work with django 1.3) on Ubuntu Natty today and got ImportError: can't import mx.DateTime module. Hmm... weird. I googled around and found a sequence of command to do a proper installation of psycopg2.
$ sudo apt-get build-dep python-psycopg2
$ virtualenv ENV
$ source ENV/bin/activate
$ easy_install psycopg2
$ easy_install egenix-mx-base

Damn mx and psycopg2==2.4.1

The sequence of commands above did not fix my ImportError: can't import mx.DateTime module. I wasted a day searching until i found its defect on psycopg2 issue tracker. In sum, if you try
$ ls /usr/include/python2.6/ | grep mx
and you found that you have mx folder there, you're screwed. Psycopg2 will try to use this damn mx instead of default datetime package and that will prevent you from installing psycopg2 in a virtualenv with --no-site-packages. I renamed the damn mx folder before I easy_install psycopg2==2.4.1, then renamed it back after the shit is done.

thank ChokchaiPhatharamalai (Proteus Productivity seeker)
ref : http://zeppelin.proteus-tech.com/ourwiki/ChokchaiPhatharamalai/HowToInstallPsycopg2

Comments

Popular posts from this blog

Difference between apt-get update and apt-get dis-upgrade