On 09/26/2013 07:07 PM, Augori wrote:
I think Python 2.4 was installed with the OS. I installed Python 2.7
from an .egg file that I downloaded. I'm a bit new to this
terminology, so not sure if that considered Centos package management.
No.
I think you're right about Python2.4 being set as the default. Does
anyone know how to persuade it otherwise for installation purposes?
Well it seems you already have psycopg2 installed for Python 2.7, it
just cannot find it. Here is a possible solution.
Open the Python 2.7 shell
import sys
then
sys.path
This will show a list of paths that Python 2.7 knows about. Look to see
if /usr/local/lib/python2.7/site-packages/ is listed.
If not, you can temporarily include it by doing:
sys.path.append('/usr/local/lib/python2.7/site-packages/')
and then
import psycopg2
If it is indeed installed in /usr/local/lib/python2.7/site-packages/ it
should load.
To make the change 'permanent' create a *.pth file in one of the
directories shown when you first did sys.path, preferably a
site-packages one. In the file put
'/usr/local/lib/python2.7/site-packages/ . Then name the file, say
usr_local.pth. Python adds directories in *.pth files to the sys.path.
Thanks.
--
Adrian Klaver
adrian.klaver@xxxxxxxxx
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general