I need to install psycopg2 for a Django project. This is what I do:
This is the error I get:
Which is the asked 27 Feb '12, 15:03 Guandalino |
pg_config is in the $PATH already on CentOS 5 machines. On, CentOS 6 machines, it is in:
Hence, you need to add that to your $PATH using:
to install psycopg2. answered 27 Feb '12, 20:17 neeravk |
psycopg2 is actually installed server wide. But if you need to install a separate version, try using the command line in the docs here http://docs.webfaction.com/software/python.html?highlight=easy_install#installing-packages-with-pip If you still have problems please post those details, or feel free to open a support ticket. https://help.webfaction.com/ answered 27 Feb '12, 17:03 bmeyer71 ♦♦ Both the system wide and the local installation don't fit my case well, because I deploy Django projects each one in its own dedicated virtual env. For this reason I need to install the packages inside the environnment, I don't want to use system wide or local packages in ~/lib/python-X.Y or so. I already installed packages in virtual environments without any problem (activating the environment and using pip the way I said in the question), but that doesn't worked with psycopg2 and I wonder why. Thanks
(27 Feb '12, 18:20)
Guandalino
To build the psql python bindings you will also need to build postgres to have the dev source available. I can understand your situation with virtualenv, yet still the easiest thing to do is to copy the library from the /usr/ copy into your virtualenv. This is the solution I use for my pinax sites. The only reason to build your own binding is if you need a modified copy, in which case you should build PostgreSQL from source too.
(27 Feb '12, 20:10)
johns
|