Installing Pillow with Mac OS X Mavericks (10.9.1)
Solution 1
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!
Solution 2
Follow these steps
- update xcode on qppstore
- open the terminal an type:
xcode-select --install
-
su
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
pip install pillow
Solution 3
a friend told me how to fix this:
- sudo su -
- export CFLAGS=-Qunused-arguments
- pip install Image
- python
- from PIL import Image
Solution 4
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
prosseek
A software engineer/programmer/researcher/professor who loves everything about software building. Programming Language: C/C++, D, Java/Groovy/Scala, C#, Objective-C, Python, Ruby, Lisp, Prolog, SQL, Smalltalk, Haskell, F#, OCaml, Erlang/Elixir, Forth, Rebol/Red Programming Tools and environments: Emacs, Eclipse, TextMate, JVM, .NET Programming Methodology: Refactoring, Design Patterns, Agile, eXtreme Computer Science: Algorithm, Compiler, Artificial Intelligence
Updated on June 09, 2022Comments
-
prosseek almost 2 years
I'm trying to install Pillow following the instruction:
http://pillow.readthedocs.org/en/latest/installation.html#mac-os-x-installation
The issue is that I got error with
python -c 'from PIL import Image
.python -c "from PIL import Image" Traceback (most recent call last): File "<string>", line 1, in <module> File "/Library/Python/2.7/site-packages/PIL/Image.py", line 53, in <module> from PIL import _imaging as core ImportError: dlopen(/Library/Python/2.7/site-packages/PIL/_imaging.so, 2): Symbol not found: _jpeg_resync_to_restart Referenced from: /Library/Python/2.7/site-packages/PIL/_imaging.so Expected in: flat namespace in /Library/Python/2.7/site-packages/PIL/_imaging.so
The message says
_jpeg_resync_to_restart
is not found, I googled to try solve this problem as follows:- Use
brew
to installPillow
: https://github.com/Homebrew/homebrew-python - Install libjpeg and install from the source: http://www.thetoryparty.com/2010/08/31/pil-on-snow-leopard-_jpeg_resync_to_restart-error/
However, nothing works. Is there any way to install Pillow on Mavericks? I use Python 2.7: the default python interpreter.
- Use
-
Paresh Mayani about 10 yearsExact duplicate of your answer, stop posting duplicate answers and there by not creating redundancy.
-
prosseek about 10 yearsDid you check after the compile all the tests in Tests directory of Pillow are passed?
-
newguy about 10 yearsNo I haven't checked the Tests directory. But Before installation I got errors. After the installation I ran this command
python -c "from PIL import Image"
No error was shown. -
newguy about 10 yearsby the way I am referencing issue link
-
Jason Aller almost 10 yearsHow about explaining what each step does and why it is needed?
-
Blaise over 8 yearsNote that this installs Django globally.