Installing Pillow with Mac OS X Mavericks (10.9.1)

前端 未结 6 1988
走了就别回头了
走了就别回头了 2020-12-20 21:25

I\'m trying to install Pillow following the instruction:

http://pillow.readthedocs.org/en/latest/installation.html#mac-os-x-installation

Th

相关标签:
6条回答
  • 2020-12-20 21:48

    Had this problem in Nov 2015. Easiest solution for me was to install a precompiled binary of pillow using wheels:

    pip install wheel
    pip install --use-wheel pillow
    
    0 讨论(0)
  • 2020-12-20 21:55
    1. Reinstall X11 from XQuartz.org
    2. Install the latest XCode
    3. Install the command line tools:

      xcode-select --install

    Worked for me on mavericks

    0 讨论(0)
  • 2020-12-20 21:59

    I confirm that following these steps I can install Pillow on Mavericks 10.9.2 with XCode 5

    1:

    brew install libtiff libjpeg webp littlecms
    

    2: go to here https://pypi.python.org/pypi/Pillow/2.3.1 downalod the zip file and unzip it.

    3: open a Terminal window and go to Pillow-2.3.1 folder in Terminal.

    4: these two lines are extremely important because they will ignore the errors during installation of Pillow, without these two lines the setup cannot be finished (I am using python 2.7 so you may need to change whatever version you use):

    sudo sed -i '' -e 's/-mno-fused-madd//g' /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_sysconfigdata.py
    sudo rm /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_sysconfigdata.pyc
    

    5: run command

    sudo python setup.py install
    

    Done!

    0 讨论(0)
  • 2020-12-20 22:00

    Installing earlier version of Pillow worked for me

    pip uninstall pillow
    pip install Pillow==2.5.0
    

    Boom Ya Baby!

    running MacOSX 10.8.5 from PIL import Image now throws no errors.

    0 讨论(0)
  • 2020-12-20 22:03

    Follow these steps

    1. update xcode on qppstore
    2. open the terminal an type:
      1. xcode-select --install
      2. su
      3. export CFLAGS=-Qunused-arguments
      4. export CPPFLAGS=-Qunused-arguments
      5. pip install pillow
    0 讨论(0)
  • 2020-12-20 22:04

    a friend told me how to fix this:

    1. sudo su -
    2. export CFLAGS=-Qunused-arguments
    3. pip install Image
    4. python
    5. from PIL import Image

    by https://github.com/moskytw

    0 讨论(0)
提交回复
热议问题