I have a CentOS 5.5 box, which comes preloaded with Python 2.4. I wanted 2.6, so used
yumto get it from the EPEL repository. I also used
yum to install the psycopg2 package, but it installed it for Python 2.4.
I tried copying
/usr/lib/python2.6/site-packages/, and when I ran my script, it worked... but it gave me a warning that said
/usr/lib/python2.6/site-packages/psycopg2/__init__.py:69: RuntimeWarning: Python C API version mismatch for module _psycopg: This Python has API version 1013, module _psycopg has version 1012.
So it looks like there's some kind of versioning issue going on here, and I'm wondering what the best way to fix it is. Should I just ignore the warning and carry on? Is there a way to use
yum to install psycopg2 for Python 2.6? Should I just install from source using
python26 setup.py install? I know installing from source is generally a no-no in CentOS, so I want this to be a last resort, unless it's the only option. I just don't want to mess up