From: | David Kerr <dmk(at)mr-paradox(dot)net> |
---|---|
To: | Augori <augori(at)gmail(dot)com> |
Cc: | chris(at)chriscurvey(dot)com, pgsql <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Trouble installing psycopg2 |
Date: | 2013-09-26 19:49:51 |
Message-ID: | 20130926194951.GA81137@mr-paradox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Sep 26, 2013 at 02:56:14PM -0400, Augori wrote:
- Thanks, for the replies Chris and David.
-
- Chris, I couldn't find any psycopg files under my Python installs, so I
- decided to try David's advice and yum install python-psycopg2
- It reported success, but it installed it under
- ../usr/lib64/python2.4/site-packages
-
- I'm working with Python2.7.5, so psycopg2 won't import. It believe that
- psycopg2 is not written for 2.4 or below. That's why I installed 2.7.5.
- So my question now is, how can I get yum to install it in the 2.7
- site-packages?
-
- Thanks.
-
- PS. About the virtualenv suggestion, I had tried using use virtualenv and
- virtualenvwrapper, following the instructions on this nice site.
- http://bda.ath.cx/blog/2009/04/08/installing-python-26-in-centos-5-or-rhel5/
- But, I couldn't get the bashrc to run without error, after adding this
- update
-
- source /opt/bin/virtualenvwrapper_bashrc
-
- So, I thought I'd throw caution to the wind and skip that part.
- (that's how I got to easy_intall, which at least allowed me to specify
- which python version)
Looking at the easy_install on my system it uses python26
head -1 /usr/bin/easy_install
#!/usr/bin/python2.6
so if you use easy_install you probably just installed it to the 2.6 stuff.
If you need 2.7 for your stuff then you'll definitely want to get virtualenv
working. If you can live with 2.6 then get rid of 2.7 on your machine
and work with the yum packages.
A better virtualenvwrapper setup doc is here (not from 2009)
http://virtualenvwrapper.readthedocs.org/en/latest/
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2013-09-26 21:02:09 | Re: Trouble installing psycopg2 |
Previous Message | Sergey Konoplev | 2013-09-26 19:18:22 | ENUM drop label workaround |