Mar 6, 2011

PIL trouble - how to make it work again

For some odd reasons (I guess it is due to some updates of Xcode or other updates within MacOS) calling certain PIL functions on a MacPort Python 2.6 installation on MacOS 10.6 ended up in the error code:
ImportError: The _imaging C module is not installed

Great! Well, some googling brought me to this article, where I got the following solution from. Many thanks to the author!

  1. Download the appropriate PIL source-code tar for your Python installation from here
  2. Open a console, navigate to the folder where you stored the source code and untar it via
    tar -xfzv [nameofpiltar].tar.gz
  3. Change into the main directory of the tarball and execute
    sudo python setup.py install
  4. Check whether the installation worked by the command:
    python selftest.py
    which should not give any error messages.
And hopefully the magic is done and PIL runs again...

No comments: