Comments and changes to this ticket

Hi, not getting your config. Win7 64 bit and you have Python 2.7
32 bit installed. Are you trying to install Psycopg 32 or 64 bit? I
assume it must be 32 but it seems you are installing the 64 bit.
Please clarify.

I've asked Jason to take a look at your case, but if it is
possible, I'd suggest you to uninstall all the Python installation
instances from your machine and try re-installing python again.

Unpacking the .exe (which you have already discovered it is a
.zip) and copying manually the psycopg2 directory and its contained
file _psycopg.dll into a PYTHONPATH directory should work as well,
provided Python is correctly installed and the 32/64 bit option and
Python version match.

Can you remove all instances of psycopg2 that you installed by
hand and start the python interpreter?:

C:\Python27\python.exe

And issue the following in the python interpreter:

import psycopg2

We should see the following error (We want it to fail at this
point)

ImportError: No module named psycopg2

If we don't, it means that python is attempting to install
psycopg2 from another location and you will have to remove those
files. What I am looking for is that python is not grabbing
psycopg2 from somewhere else, and that we are starting from a clean
slate.

Once we are at this point, we can extract the files by hand.
Using a program like 7zip, open up the above psycopg2 installation
package. Go into the PLATLIB directory. At this point, there will
be a psycopg2 directory and a psycopg2-2.4.5-py2.7.egg-info file.
The "psycopg2" directory should be extracted and placed in the
"C:\Python27\lib\site-packages" directory.

Start the python interpreter again and issue the import
psycopg2, this time it should be successful with importing the
module. (Fingers crossed).

If you are still having problems, issue the following commands
at the python interpreter and let me know the output:

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="https://github.com/psycopg/psycopg2/issues">the new tracker</a>.
<br/>
Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.