Can't install PIL after Mac OS X 10.9

前端 未结 28 1023
长情又很酷
长情又很酷 2020-11-28 17:41

I\'ve just updated my Mac OS to 10.9 and I discovered that some (all?) of my Python modules are not here anymore, especially the Image one.

So I try to execute

相关标签:
28条回答
  • 2020-11-28 18:18

    Following worked for me:

    ln -s  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 /usr/local/include/X11
    sudo pip install pil
    

    UPDATE:

    But there is more correct solution below, provided by Will.

    open your terminal and execute: xcode-select --install

    0 讨论(0)
  • 2020-11-28 18:18

    Non of those worked for me.. I kept receiving:

    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
    clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
    error: command 'cc' failed with exit status 1
    

    So I found a work around with the following solution:

    sudo export CFLAGS=-Qunused-arguments
    sudo export CPPFLAGS=-Qunused-arguments
    sudo pip install PIL --allow-external PIL --allow-unverified PIL
    

    This way I was able to install.

    0 讨论(0)
  • 2020-11-28 18:18

    This my steps on mac os 10.9.1

    1. sudo su
    2. easy_install pip
    3. xcode-select --install
    4. pip install --no-index -f http://dist.plone.org/thirdparty/ -U PIL
    
    0 讨论(0)
  • 2020-11-28 18:19

    Install Pillow instead:

    sudo pip install pillow
    
    0 讨论(0)
  • 2020-11-28 18:20
    sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/ /usr/local/include/X11
    

    helps for me! os x 10.9

    pip install pillow
    

    but! after pip install ...

    *** ZLIB (PNG/ZIP) support not available
    

    and finally i fix it by running:

    xcode-select --install
    

    then reinstall pillow

    pip install pillow
    
    PIL SETUP SUMMARY
        --------------------------------------------------------------------
        version      Pillow 2.2.1
        platform     darwin 2.7.5 (default, Aug 25 2013, 00:04:04)
                     [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
        --------------------------------------------------------------------
        --- TKINTER support available
        --- JPEG support available
        --- ZLIB (PNG/ZIP) support available
        --- TIFF G3/G4 (experimental) support available
        --- FREETYPE2 support available
        --- LITTLECMS support available
        --- WEBP support available
        --- WEBPMUX support available
        --------------------------------------------------------------------
    
    0 讨论(0)
  • 2020-11-28 18:22

    You could use Homebrew to do the install http://brew.sh

    brew tap Homebrew/python
    brew install pillow
    
    0 讨论(0)
提交回复
热议问题