由于gcc-4.2无法安装python枕头

时间:2014-01-15 00:16:21

标签: python gcc4 pillow

我已经尝试了很多东西来实现这一目标。关于gcc-4.2的问题,我已经经历了很多线程,但它仍然没有用。有没有人有任何圣人建议将这个扼杀在萌芽状态?

我使用的是Snow Leopard OSX 6.8。

由于

~/code: pip install pillow
     Downloading/unpacking pillow
     Downloading Pillow-2.3.0.zip (2.4Mb): 2.4Mb downloaded
     Running setup.py egg_info for package pillow

Installing collected packages: pillow
  Running setup.py install for pillow

    --- using frameworks at /System/Library/Frameworks
    building 'PIL._imaging' extension
    gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/opt/local/include/freetype2 -I/Users/methuselah/code/build/pillow/libImaging -I/Library/Frameworks/Python.framework/Versions/2.7/include -I/opt/local/include -I/usr/X11/include -I/usr/local/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.6-intel-2.7/_imaging.o
    gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/opt/local/include/freetype2 -I/Users/methuselah/code/build/pillow/libImaging -I/Library/Frameworks/Python.framework/Versions/2.7/include -I/opt/local/include -I/usr/X11/include -I/usr/local/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c decode.c -o build/temp.macosx-10.6-intel-2.7/decode.o
    In file included from decode.c:416:
    /Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:10:20: error: tiffio.h: No such file or directory
    /Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:13:18: error: tiff.h: No such file or directory
    In file included from decode.c:416:
    /Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:30: error: expected specifier-qualifier-list before ‘tdata_t’
    /Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:43: error: expected declaration specifiers or ‘...’ before ‘ttag_t’
    In file included from decode.c:416:
    /Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:10:20: error: tiffio.h: No such file or directory
    /Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:13:18: error: tiff.h: No such file or directory
    In file included from decode.c:416:
    /Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:30: error: expected specifier-qualifier-list before ‘tdata_t’
    /Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:43: error: expected declaration specifiers or ‘...’ before ‘ttag_t’
    lipo: can't figure out the architecture type of: /var/folders/6H/6H1XlbmGH2KSrJyf0XI4Ck+++TI/-Tmp-//ccbGKQc0.out
    error: command 'gcc-4.2' failed with exit status 1
    Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/Users/methuselah/code/build/pillow/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/6H/6H1XlbmGH2KSrJyf0XI4Ck+++TI/-Tmp-/pip-efu6j4-record/install-record.txt:
    running install

running build

running build_py

creating build

creating build/lib.macosx-10.6-intel-2.7

creating build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/__init__.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/_binary.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/_util.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ArgImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/BdfFontFile.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/BmpImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ContainerIO.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/CurImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/DcxImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/EpsImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ExifTags.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/FliImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/FontFile.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/FpxImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/GbrImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/GdImageFile.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/GifImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/GimpGradientFile.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/GimpPaletteFile.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/GribStubImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/IcnsImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/IcoImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/Image.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageChops.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageCms.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageColor.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageDraw.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageDraw2.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageEnhance.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageFile.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageFileIO.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageFilter.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageFont.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageGrab.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageMath.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageMode.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageOps.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImagePalette.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImagePath.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageQt.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageSequence.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageShow.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageStat.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageTk.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageTransform.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImageWin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/ImtImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/IptcImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/JpegImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/JpegPresets.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/McIdasImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/MicImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/MpegImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/MspImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/OleFileIO.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PaletteFile.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PalmImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PcdImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PcfFontFile.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PcxImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PdfImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PixarImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PngImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PpmImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PsdImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/PSDraw.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/SgiImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/SpiderImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/SunImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/TarIO.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/tests.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/TgaImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/TiffImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/TiffTags.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/WalImageFile.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/WebPImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/WmfImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/XbmImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/XpmImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

copying PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.6-intel-2.7/PIL

running egg_info

writing Pillow.egg-info/PKG-INFO

writing top-level names to Pillow.egg-info/top_level.txt

writing dependency_links to Pillow.egg-info/dependency_links.txt

warning: manifest_maker: standard file '-c' not found



reading manifest file 'Pillow.egg-info/SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'Pillow.egg-info/SOURCES.txt'

running build_ext

--- using frameworks at /System/Library/Frameworks

building 'PIL._imaging' extension

creating build/temp.macosx-10.6-intel-2.7

creating build/temp.macosx-10.6-intel-2.7/libImaging

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/opt/local/include/freetype2 -I/Users/methuselah/code/build/pillow/libImaging -I/Library/Frameworks/Python.framework/Versions/2.7/include -I/opt/local/include -I/usr/X11/include -I/usr/local/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.6-intel-2.7/_imaging.o

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -DHAVE_LIBJPEG -DHAVE_LIBZ -DHAVE_LIBTIFF -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/opt/local/include/freetype2 -I/Users/methuselah/code/build/pillow/libImaging -I/Library/Frameworks/Python.framework/Versions/2.7/include -I/opt/local/include -I/usr/X11/include -I/usr/local/include -I/usr/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c decode.c -o build/temp.macosx-10.6-intel-2.7/decode.o

In file included from decode.c:416:

/Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:10:20: error: tiffio.h: No such file or directory

/Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:13:18: error: tiff.h: No such file or directory

In file included from decode.c:416:

/Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:30: error: expected specifier-qualifier-list before ‘tdata_t’

/Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:43: error: expected declaration specifiers or ‘...’ before ‘ttag_t’

In file included from decode.c:416:

/Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:10:20: error: tiffio.h: No such file or directory

/Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:13:18: error: tiff.h: No such file or directory

In file included from decode.c:416:

/Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:30: error: expected specifier-qualifier-list before ‘tdata_t’

/Users/methuselah/code/build/pillow/libImaging/TiffDecode.h:43: error: expected declaration specifiers or ‘...’ before ‘ttag_t’

lipo: can't figure out the architecture type of: /var/folders/6H/6H1XlbmGH2KSrJyf0XI4Ck+++TI/-Tmp-//ccbGKQc0.out

error: command 'gcc-4.2' failed with exit status 1

----------------------------------------
Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools;__file__='/Users/methuselah/code/build/pillow/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/6H/6H1XlbmGH2KSrJyf0XI4Ck+++TI/-Tmp-/pip-efu6j4-record/install-record.txt failed with error code 1
Storing complete log in /Users/methuselah/.pip/pip.log
~/code: 

1 个答案:

答案 0 :(得分:2)

我最好的建议是使用MacPorts(或Homebrew来安装所需的所有依赖项,否则手动将它们全部追下来真的很痛苦。我更喜欢MacPorts,但是其他人没有,所以你的里程可能会有所不同。为了表明它有多容易,在我的系统上我会跑:

sudo port install py27-Pillow

并自动配置和安装所有内容。当然,这确实需要安装MacPorts版本的Python,但是如果版本匹配,你应该能够移动大部分site-packages。{{1}}。网站上有很棒的文档,请查看。