0

它是否试图“有帮助”?

我正在运行 win 8 64x。我需要安装 psycopg 32x。我使用heroku指南中所述的命令

easy_install http://www.stickpeople.com/projects/python/win-psycopg/2.4.6/psycopg2-2.4.6.win32-py2.7-pg9.2.2-release.exe

然后我看到它安装

Installed \venv\lib\site-packages\psycopg2-2.4.6-py2.7-win-amd64.egg

这是 64x 版本,而不是我需要的 32x。

后来我得到错误

ImportError: DLL load failed: %1 is not a valid Win32 application.

我在想也许 psycopg 的 windows 32x 安装程序被标记为错误的,但这不太可能。

4

1 回答 1

1

您应该使用easy_install由 32 位版本的 cpython 安装的那个。(easy_install 不仅可以使用 32 位和 64 位版本的 cpython,还可以使用其他 python 实现,例如 pypy ..)

curl -O http://python-distribute.org/distribute_setup.py
python distribute_setup.py <= change this line to make use of 32bit version of cpython
于 2013-03-14T00:35:05.043 回答