pinax / pinax-project-teams

a starter project that has account management, profiles, teams and basic collaborative content.
20 stars 6 forks source link

fatal error: 'X11/Xlib.h' file not found (OSX 10.9.4) #1

Closed nolenjb closed 10 years ago

nolenjb commented 10 years ago

When running pip install -r requirements.txt, I got this error:

NOTE: I successfully created a pinax-project-account project with no issues. I created a new virtualenv to play around with pinax-project-teams, and it failed to complete the requirements installs.

building 'PIL._imagingtk' extension

creating build/temp.macosx-10.9-intel-2.7/Tk

cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/Users/nolenjb/Sites/carbuyline/ve/build/Pillow/libImaging -I/Users/nolenjb/Sites/carbuyline/ve/include -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _imagingtk.c -o build/temp.macosx-10.9-intel-2.7/_imagingtk.o -framework Tcl -framework Tk

clang: warning: -framework Tcl: 'linker' input unused

clang: warning: -framework Tk: 'linker' input unused

In file included from _imagingtk.c:19:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found

include <X11/Xlib.h>

            ^

1 error generated.

error: command 'cc' failed with exit status 1


Cleaning up... Command /Users/nolenjb/Sites/carbuyline/ve/bin/python -c "import setuptools, tokenize;file='/Users/nolenjb/Sites/carbuyline/ve/build/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/yp/x8qtkthd0341t5jp5z0l6mr0000gn/T/pip-UgetN-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/nolenjb/Sites/carbuyline/ve/include/site/python2.7 failed with error code 1 in /Users/nolenjb/Sites/carbuyline/ve/build/Pillow Storing debug log for failure in /Users/nolenjb/.pip/pip.log

brosner commented 10 years ago

This isn't an issue with this project. The issue is because this project depends on Pillow you have to install it for it to work. The installation of Pillow is failing due to a missing header. You might want to look around the Internet for people who have had this similar issue and see what the problem is.

nolenjb commented 10 years ago

In case anyone else encounters this issue on OSX 10.9.4, the solution was to close terminal with virtualenv running, open a new terminal and run:

sudo xcode-select --install

open new terminal, activate virtualenv, and try the install again. This worked for me.

Developer112 commented 9 years ago

Having the same problem here for using with pygame ...

yao23 commented 8 years ago

have the same issue and xcode-select --install works for me

Hellengo commented 7 years ago

try ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 /usr/local/include/X11

trentbullard commented 5 years ago

try ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 /usr/local/include/X11

be sure to check the osx version number in the xcode package uri

guenchi commented 5 years ago

try ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11 /usr/local/include/X11

thx it's work

marktani commented 5 years ago

I had to run

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/ /usr/local/include/X11
fotiDim commented 4 years ago

For Catalina:

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/ /usr/local/include/X11
IlyaSemenov commented 3 years ago

You don't have to create a symlink, temporary setting CPPFLAGS will do:

CPPFLAGS="$CPPFLAGS -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk//System/Library/Frameworks/Tk.framework/Versions/8.5/Headers" pip install -r requirements.txt
KungFuFurby commented 3 years ago

For Catalina:

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/ /usr/local/include/X11

If MacOSX10.15.sdk does not exist, use MacOSX.sdk instead. The resulting path would be like this...

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/