简体   繁体   中英

cygwin 64 bit - can't install Pillow via pip

I can't seem to install pip on cygwin 64-bit no matter which of the gcc compilers i install. i've tried all of the ones that come up when is search for g++

does anyone know which one i should use? or if i'm going about this completely the wrong way?

when building pip i get errors like this:

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?)."
  ^

You wrote you installed and tried multiple compilers. If you mean compilers from setup.exe, then "gcc" is the Cygwin compiler with same number of bits as the Cygwin it's installed from (ie cygwin32 compiler on cygwin32 and cygwin64 compiler on cygwin64). Other compilers have different names, for example x86_64-w64-mingw32-gcc, or x86_64-pc-cygwin-gcc.

The problem is probably that -- if you want to compile using a Cygwin compiler -- you should be using Python headers from Cygwin Python. It looks like /c/Users/guy/Envs/hippo_dev/include/ contains Python headers from some 32-bit Python. Generally speaking, you shouldn't mix in any non-Cygwin-provided headers or libraries unless you're sure they're compatible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM