我试图在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代码的第一件事,请不要假设先验知识。
最佳答案
我知道这个问题很旧,但是最近我也遇到了类似的问题。问题是我的gcc编译器是64位,而python安装是32位。我使用64位版本重新安装了python解释器,并且停止弹出“跳过不兼容的C:\ Python34 \ libs \ python34.lib”消息。
关于python - pip install提供:跳过不兼容的python libs和gcc失败,退出状态为1,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28262899/