Search code examples
pythonlinuxpython-imaging-libraryeasy-install

PIL Installation Fails missing:stdarg.h


Possible Duplicate:
Installing Python Imaging Library (PIL) on Snow Leopard with updated Python 2.6.2

Runing MAC 10.7.2 While trying to install PIL, after resolving many gcc issues, the installation exits with this line:

/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory

i'm using this line for install:

env ARCHFLAGS="-arch i386 -arch x86_64" easy_install PIL

full output:

WARNING: '' not a valid package name; please use only.-separated package names in setup.py --- using frameworks at /System/Library/Frameworks In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4, from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85, from _imaging.c:75: /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory _imaging.c:3017: warning: initialization from incompatible pointer type _imaging.c:3077: warning: initialization from incompatible pointer type In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4, from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85, from _imaging.c:75: /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory _imaging.c:3017: warning: initialization from incompatible pointer type _imaging.c:3077: warning: initialization from incompatible pointer type lipo: can't figure out the architecture type of: /var/folders/2l/nrkm12097b58kk8n9hrbtz840000gn/T//cckCPEox.out error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1


Solution

  • Problem Solved , the steps i took:

    Step 1: Uninstalled and Installed Xcode, suggested here: http://binarylionstudios.com/blog/2011/01/30/error-stdarg.h-no-such-file-or-directory/

    to remove Xcode properlly follow this answer: How to fully remove Xcode 4

    sudo /Developer/Library/uninstall-devtools --mode=all

    use the install Xcode.app after you restart your mac

    Step 2: after xcode was reinstalled, the installation failed

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

    to resolve that i followed this post: http://aravir-rose.blogspot.com/2011/12/installing-python-27s-imaging-library.html

    Good luck!