cygwin 64位 - 无法通过pip安装Pillow

时间:2015-04-21 03:48:43

标签: python gcc cygwin pip pillow

无论我安装哪个gcc编译器,我都无法在cygwin 64位上安装pip。我已经尝试了搜索g ++时出现的所有内容

有谁知道我应该使用哪一个?或者如果我以完全错误的方式解决这个问题?

当构建pip时,我得到这样的错误:

gcc -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.8-1.x86_64/build=/usr/src/debug/python-2.7.8-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.8-1.x86_64/src/Python-2.7.8=/usr/src/debug/python-2.7.8-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_LIBZ -I/usr/include/freetype2 -I/tmp/pip-build-AceIfG/Pillow/libImaging -I/c/Users/guy/Envs/hippo_dev/include -I/usr/include -I/usr/include/python2.7 -c libImaging/ConvertYCbCr.c -o build/temp.cygwin-1.7.35-x86_64-2.7/libImaging/ConvertYCbCr.o
In file included from /c/Users/guy/Envs/hippo_dev/include/Python.h:58:0,
                 from outline.c:20:
/c/Users/guy/Envs/hippo_dev/include/pyport.h:886:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  ^
In file included from /c/Users/guy/Envs/hippo_dev/include/Python.h:58:0,
                 from libImaging/ImPlatform.h:10,
                 from libImaging/Imaging.h:14,
                 from libImaging/ConvertYCbCr.c:15:
/c/Users/guy/Envs/hippo_dev/include/pyport.h:886:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  ^
In file included from /c/Users/guy/Envs/hippo_dev/include/Python.h:58:0,
                 from libImaging/ImPlatform.h:10,
                 from libImaging/Imaging.h:14,
                 from libImaging/Bands.c:19:
/c/Users/guy/Envs/hippo_dev/include/pyport.h:886:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  ^
In file included from /c/Users/guy/Envs/hippo_dev/include/Python.h:58:0,
                 from _imaging.c:76:
/c/Users/guy/Envs/hippo_dev/include/pyport.h:886:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  ^

1 个答案:

答案 0 :(得分:0)

你写了你安装并尝试了多个编译器。如果你的意思是来自setup.exe的编译器,那么" gcc"是Cygwin编译器,它的位数与安装的Cygwin相同(即cygwin32上的cygwin32编译器和cygwin64上的cygwin64编译器)。其他编译器有不同的名称,例如x86_64-w64-mingw32-gcc或x86_64-pc-cygwin-gcc。

问题可能是 - 如果你想使用Cygwin编译器进行编译 - 你应该使用Cygwin Python的Python头文件。看起来/c/Users/guy/Envs/hippo_dev/include/包含来自某些32位Python的Python头文件。一般来说,除非您确定它们是否兼容,否则您不应该混合任何非Cygwin提供的标题或库。