无法在具有Python 3.4.3和PostgreSQL 9.4.4的Windows 7上安装psycopg [英] Can't install psycopg on Windows 7 with Python 3.4.3 and PostgreSQL 9.4.4

查看:170
本文介绍了无法在具有Python 3.4.3和PostgreSQL 9.4.4的Windows 7上安装psycopg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Wheel文件在Windows 7(64位)上使用Python 3.4.3和PostgreSQL 9.4.4安装psycopg(来自 http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg )和命令:

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

我得到错误:

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

更新:
我尝试使用easy_install命令:

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')


推荐答案

您需要安装 psycopg2‑2.6.1‑cp34‑none‑win32.whl 。 Windows可能是64位,但Python安装仍然是32位。安装的软件包应与Python安装匹配,而不与Windows安装匹配。

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.

这是一个常见问题,因为 http://python.org 默认情况下会将您重定向到32位Python,即使在Windows 64位和Chrome 64位上浏览也是如此。

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.

这篇关于无法在具有Python 3.4.3和PostgreSQL 9.4.4的Windows 7上安装psycopg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆