tyebillion tyebillion - 2 years ago 198
Python Question

Can't install psycopg on Windows 7 with Python 3.4.3 and PostgreSQL 9.4.4

I'm installing psycopg on Windows 7 (64 bit) with Python 3.4.3 and PostgreSQL 9.4.4, using a wheel file (from http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg) and the command:

pip install psycopg2-2.6.1-cp34-none-win_amd64.whl

I get the error:

psycopg2-2.6.1-cp34-none-win_amd64.whl is not a supported wheel on this platform.

I tried using the easy_install command:

easy_install psycopg2-2.6.1.win-amd64-py3.4-pg9.4.4-release.exe

Searching for psycopg2-2.6.1.win-amd64-py3.4-pg9.4.4-release.exe
Reading https://pypi.python.org/simple/psycopg2-2.6.1.win-amd64-py3.4-pg9.4.4-re
Couldn't find index page for 'psycopg2-2.6.1.win-amd64-py3.4-pg9.4.4-release.exe
' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for psycopg2-2.6.1.win-amd64-py3.4-pg9
error: Could not find suitable distribution for Requirement.parse('psycopg2-2.6.

Answer Source

You need to install psycopg2‑2.6.1‑cp34‑none‑win32.whl. Your Windows might be 64-bit, but your Python installation is still 32-bit. The packages you install should match your Python installation, not your Windows installation.

This is a common issue as http://python.org redirects you to Python 32-bit by default, even when browsing on Windows 64-bit and even with Chrome 64-bit.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download