Reputation: 3383
I'm trying to install the Python PIL library on mac OS 10.13.
I know about Pillow, but I want my code to work on Google App Engine which only supports PIL.
I tried sudo pip install pil
and got:
Collecting pil
Could not find a version that satisfies the requirement pil (from versions: )
No matching distribution found for pil
This confuses me because pip search pil
does list PIL in the results. Trying to install a specific version, like pil==1.1.6
, got the same result. Writing PIL
instead of pil
also didn't help.
I also tried giving an explicit URL: sudo pip install http://effbot.org/media/downloads/Imaging-1.1.7.tar.gz
but that got a compiler error:
In file included from _imagingtk.c:19:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.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
How can I get this installation to work?
Upvotes: 0
Views: 2753
Reputation: 3383
I solved the X11 compiler error by doing xcode-select --install
Found the answer here: https://stackoverflow.com/a/43716118/310159
Upvotes: 1