我正在尝试在Windows 8上安装cytoolz并运行" pip install cytoolz"给了我:
c:/program files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible C:\Python34\libs/libpython34.a when searching for -lpython34
c:/program files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible C:\Python34\libs/python34.lib when searching for -lpython34
c:/program files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible C:\Python34\libs\libpython34.a when searching for -lpython34
c:/program files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible C:\Python34\libs/libpython34.a when searching for -lpython34
c:/program files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible C:\Python34\libs/python34.lib when searching for -lpython34
c:/program files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
skipping incompatible C:\Python34\libs\python34.lib when searching for -lpython34
c:/program files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe:
cannot find -lpython34
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\Program Files\\mingw-builds\\x64-4.8.1-posix-seh-rev5\\mingw64\\bin\\gcc.exe' failed with exit status 1
然而.lib和.a位于C:\ Python34 \ libs中。我找到的大部分解决方案都是关于安装python-dev,但是我在windows上......从我读过的内容来看,我认为这是mingw和python lib之间的链接问题(不确定这意味着什么),但是路径C:\ Python34是正确的,所以我不明白为什么这些库没有找到或不兼容。
我之前的问题是我找不到vsvarsall.bat,我使用了this solution。
我不知道为python编译C代码的第一件事,请不要假设先验知识。
答案 0 :(得分:2)
我知道这个问题很老,但最近我遇到了类似的问题。问题是我的gcc编译器是64位,我的python安装是32位。我使用64位版本重新安装了python解释器,它停止弹出"跳过不兼容的C:\ Python34 \ libs \ python34.lib"消息。