在Windows 8上安装Python psycopg2-2.5.1

时间:2014-06-26 13:57:56

标签: python postgresql mingw32

我正在安装Python psycopg2,它的编译失败:  操作系统:Windows 8 64位  Python:2.7  的mingw-W64

C:/mingw-w64/x86_64-4.9.0-win32-seh-rt_v3-rev2/mingw64/bin/../lib/gcc/x86_64-w64
-mingw32/4.9.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lpython27

collect2.exe: error: ld returned 1 exit status
error: command 'C:\\mingw-w64\\x86_64-4.9.0-win32-seh-rt_v3-rev2\\mingw64\\bin\\
gcc.exe' failed with exit status 1

1 个答案:

答案 0 :(得分:2)

  

找不到-lpython27

python27.lib不在您的LIBRARY_PATH上。很难说为什么或提供更多信息,因为你没有解释你如何达到这一点 - 命令运行,安装Python版本等。

无论如何,我强烈建议您just use the binary installers。请参阅以下现有答案:

相关问题