2

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.

Update: 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
lease.exe/
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
.4.4-release.exe
error: Could not find suitable distribution for Requirement.parse('psycopg2-2.6.
1.win-amd64-py3.4-pg9.4.4-release.exe')
gornvix
  • 3,154
  • 6
  • 35
  • 74
  • 1
    What's your python installation? Run python and paste the first line (e.g. `Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32`. – kichik Aug 21 '15 at 19:25

2 Answers2

4

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.

kichik
  • 33,220
  • 7
  • 94
  • 114
1

Try this:

C:\>python -m easy_install --upgrade setuptools
C:\>cd path\to\folder\psycopg
D:\path\>python -m pip install psycopg2-2.6.1-cp34-none-win_amd64.whl
Sergey Nosov
  • 350
  • 3
  • 10