0

Possible Duplicate:
The problem with installing PIL using virtualenv or buildout
how to install PIL on mac os x 10.7.2 Lion

I'm trying to install the latest version of PIL (1.1.7) on Mac OS X Lion (10.7.4). I generally just use PIP and the following command:

sudo pip install package_name

However, I'm getting an error message for PIL, as it is refusing to cooperate with me.

Here is what I received:

    mac-cordreys-macbook-pro:~ maccordrey$ sudo pip install PIL
Password:
Downloading/unpacking PIL
  Downloading PIL-1.1.7.tar.gz (506Kb): 506Kb downloaded
  Running setup.py egg_info for package PIL
    WARNING: '' not a valid package name; please use only.-separated package names in setup.py

Installing collected packages: PIL
  Running setup.py install for PIL
    WARNING: '' not a valid package name; please use only.-separated package names in setup.py
    --- using frameworks at /System/Library/Frameworks
    building '_imaging' extension
    llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.7-intel-2.7/_imaging.o
    unable to execute llvm-gcc-4.2: No such file or directory
    error: command 'llvm-gcc-4.2' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/Users/maccordrey/build/PIL/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-KmYgGQ-record/install-record.txt:
    WARNING: '' not a valid package name; please use only.-separated package names in setup.py

running install

running build

running build_py

creating build

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

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

(To save space I've redacted this middle portion, but it's just more copying of package scripts.)

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

running build_ext

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

building '_imaging' extension

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

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

llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -IlibImaging -I/System/Library/Frameworks/Python.framework/Versions/2.7/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imaging.c -o build/temp.macosx-10.7-intel-2.7/_imaging.o

unable to execute llvm-gcc-4.2: No such file or directory

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

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/Users/maccordrey/build/PIL/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-KmYgGQ-record/install-record.txt failed with error code 1 in /Users/maccordrey/build/PIL
Storing complete log in /Users/maccordrey/Library/Logs/pip.log

Any advice would be appreciated! Thank you!

I should also note that when trying to install Pillow as an alternative I received the exact same error message.

Community
  • 1
  • 1
mcbaby
  • 45
  • 2
  • 6
  • 1
    Have you tried using [Pillow](http://pypi.python.org/pypi/Pillow)? It's designed to be much friendlier-to-install than PIL. – kojiro Jul 25 '12 at 20:24
  • Did you install xcode along with the command line tools? – jdi Jul 25 '12 at 20:26
  • 3
    http://stackoverflow.com/questions/9070074/how-to-install-pil-on-mac-os-x-10-7-2-lion – Sean McCully Jul 25 '12 at 20:26
  • @jdi I've done nothing regarding xcode at all. – mcbaby Jul 25 '12 at 20:51
  • @Sean I saw that thread earlier, but seeing as we face different errors, and that I am using pip, I felt a separate question may be in order. If a separate question was not in order, I apologize. Thanks you! – mcbaby Jul 25 '12 at 20:54
  • @kojiro I'll definitely check it out, thanks! Interestingly enough, I received the exact same error while trying to install Pillow. Any thoughts? – mcbaby Jul 25 '12 at 20:54
  • 1
    You *NEED* xcode, or at least to install the GCC without XCODE package. Without it you don't have a compiler and can't build anything that needs one. – jdi Jul 25 '12 at 21:02
  • awesome, if I have xcode installed (which I do, though I never use it) what should I be doing? – mcbaby Jul 25 '12 at 21:10

0 Answers0