Search Postgresql Archives

Re: Trouble installing psycopg2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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.klaver@xxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux