From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | Augori <augori(at)gmail(dot)com> |
Cc: | pgsql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Trouble installing psycopg2 |
Date: | 2013-09-27 14:50:59 |
Message-ID: | 52459B53.40009@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 09/27/2013 04:45 AM, Augori wrote:
> *Thanks again for the suggestions. It doesn't look to me like it's
> installed in /usr/local/lib/python2.7/site-packages. There's an egg
> directory there, but otherwise, no psycopg2. The egg directory doesn't
> mean it's installed, does it?? Here's an ls of that site-packages dir:*
>
Yes, an egg is just a zip file that at the destination may remain zipped
or be unzipped into a directory:
http://stackoverflow.com/questions/2051192/what-is-a-python-egg
>
> *If I modify my sys.path, it still doesn't import psycopg2. The python
> command runs version 2.7.5 and you can see that in evidence in the sys
> path. It is looking at a different Python 2.7 that I installed under
> opt/bin and added to the PATH variable when I was trying to set up a
> virtualenvwrapper. *
So you have two versions of Python 2.7 in play, this complicates the issue.
>
> *But I can't get psycopg2 to install to the 2.7.5 directory. Its
> site-packages is completely empty:*
>
> root(at)server [/usr/bin]# ls /opt/lib/python2.7/site-packages
> ./ ../ README
Probably because programs are being installed in the other version of
Python 2.7
>
>
> *whereas, /usr/lib64/python2.4/site-packages/ is full of stuff,
> including psycopg2. I've pasted just a small portion of the ls results
> below.*
It is the default Python and the one CentOS is using when it
installs/updates Python.
>
> *I also tried appending this path and importing. That gives a different
> error --tries to import it but fails, probably because it's inside a 2.4
> install:*
>
That is correct Python 2.7 needs a version of psycopg2 compiled for it
not 2.4.
>
> Do you have other ideas?
Clean house. Uninstall the two versions of Python 2.7 you have and start
over.
A bit of Googling found the below, it refers to CentOS 6 but is pointed
to by people as useful on CentOS 5 also.
http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2013-09-27 14:58:44 | Re: Trouble installing psycopg2 |
Previous Message | Adrian Klaver | 2013-09-27 14:16:09 | Re: Building with MinGW issue |