I installed psycopg2 in virtualenv using easy_install psycopg2
. I did not see any errors and looks like installation went fine.. there is an egg file created in
There is an alternative to install python packages in your computer i.e, pip
. You can download python packages by just executing:-
pip install psycopg2
The general format of the command is
pip install [package-name]
P.S:- To install python packages globally through pip
sudo pip install [package-name]
Have you checked that PostgreSQL's 'bin' directory is on the system path? Check with a quick typing of 'set' and see what you get.
This is the most common cause of import failures of psycopg2 on Windows.
Edit: this solution is outdated. Refer to this answer instead.
I had the same problem. Following the suggestion on the download page of the Windows port for getting it working on Zope worked for me under virtualenv (also in the non-virtual install):