0

I'm trying to install Python Imaging Library, Running on Mac OS X 10.6.8 Python version 2.6

Everything went well until I ran

python setup.py build_ext -i

I get the following error on Terminal

unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1

-- Could you please advice if I need to install some other library prior to running this installation? --- many thanks

  • Why don't you try `pip install pil` after [installing pip](http://darklaunch.com/2011/11/24/osx-install-pip-virtualenv-virtualenvwrapper-on-mac)? Also try to use Python-2.7.3 as it is the most stable version. – arulmr Feb 28 '13 at 10:49
  • @arulmr: PIL has quite some issues with packaging and `pip` installing it won't work out so well, I fear. See [The problem with installing PIL using virtualenv or buildout](http://stackoverflow.com/questions/2485295/2486396#2486396) – Martijn Pieters Feb 28 '13 at 11:00
  • 1
    You want to use `pip install pillow` perhaps. See [The problem with installing PIL using virtualenv or buildout](http://stackoverflow.com/questions/2485295/7770547#7770547) – Martijn Pieters Feb 28 '13 at 11:00
  • wait-- figuring this. many thanks for your help – user2119194 Feb 28 '13 at 11:05
  • @MartijnPieters You are correct. I faced the same issue once. But I forgot about it. Thanks for reminding. – arulmr Feb 28 '13 at 11:05

1 Answers1

-1

Well looks like you do not have GCC installed. To verify type gcc --version in your terminal.

Try installing the gcc package for 10.6 from here GCC package

Once installed try installing PIL using PIP

techytux
  • 9
  • 1
  • I installed GCC -- version 4.2.1 - tried PIP and PILLOW but got - lipo: can't open input file: /var/folders/55/55JObugzH0OTPidPVXrPp++++TI/-Tmp-//ccQQasxQ.out (No such file or directory) error: command 'gcc-4.2' failed with exit status 1 is there other library in Python that works with raster images other than Pil – user2119194 Feb 28 '13 at 11:44
  • Try one of the steps mentioned here http://stackoverflow.com/questions/1438270/installing-python-imaging-library-pil-on-snow-leopard-with-updated-python-2-6 to install PIL. Other than that you can try imagemagick. You will need homebrew to install it. – techytux Mar 01 '13 at 06:03