Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing on OS X 10.8.1 fails with "'Python.h' file not found" #10

Closed
pydolan opened this issue Sep 3, 2012 · 7 comments
Closed

Installing on OS X 10.8.1 fails with "'Python.h' file not found" #10

pydolan opened this issue Sep 3, 2012 · 7 comments

Comments

@pydolan
Copy link

pydolan commented Sep 3, 2012

When trying to install Pillow, I run "sudo easy_install pillow", and receive the below. I ended up installing Pil instead, which gave the same error until I manually specified where to find the libraries (as described here: http://stackoverflow.com/questions/12180225/how-do-i-build-pil-on-os-x-mountain-lion/12180993#comment16321068_12180993 ).

Searching for pillow
Reading http://pypi.python.org/simple/pillow/
Reading http://github.com/collective/Pillow
Reading http://github.com/collective/pillow
Reading http://github.com/Pillow
Reading http://github.com/python-imaging/Pillow
Best match: Pillow 1.7.7
Downloading http://pypi.python.org/packages/source/P/Pillow/Pillow-1.7.7.zip#md5=0617fae88d62422b878906a3c394c687
Processing Pillow-1.7.7.zip
Running Pillow-1.7.7/setup.py -q bdist_egg --dist-dir /tmp/easy_install-VYWTNa/Pillow-1.7.7/egg-dist-tmp-fmLDmb
warning: no previously-included files found matching '.hgignore'
warning: no previously-included files found matching '.hgtags'
warning: no previously-included files found matching 'BUILDME.bat'
warning: no previously-included files found matching 'make-manifest.py'
warning: no previously-included files found matching 'SHIP'
warning: no previously-included files found matching 'SHIP.bat'
warning: no previously-included files matching '*' found under directory 'Tests'
--- using frameworks at /System/Library/Frameworks
clang: warning: argument unused during compilation: '-mno-fused-madd'
_imaging.c:75:10: fatal error: 'Python.h' file not found

include "Python.h"

     ^

1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1

@aclark4life
Copy link
Member

This usually means you have some libs somewhere pillow does not know about. I have OS X, let me see if I can reproduce.

@aclark4life
Copy link
Member

I can't reproduce this on a clean install

@alexsani
Copy link

Hi, i have the same problem on a cleaning OS X 10.8.2.
In virtualenv with python 2.6

$sudo bin/easy_install Pillow
 Password:
 Searching for Pillow
 Reading http://pypi.python.org/simple/Pillow/
 Reading http://github.com/collective/Pillow
 Reading http://github.com/collective/pillow
 Reading http://github.com/python-imaging/Pillow
 Reading http://github.com/Pillow
 Best match: Pillow 1.7.8
 Downloading http://pypi.python.org/packages/source/P/Pillow/Pillow1.7.8.zip#md5=41d8688d4db72673069a6dc63b5289d6
 Processing Pillow-1.7.8.zip
 Running Pillow-1.7.8/setup.py -q bdist_egg --dist-dir /tmp/easy_install-rmxhaK/Pillow-1.7.8/egg-dist-tmp-KdJZUU
 /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py:266: UserWarning:
 Unknown distribution option: 'use_2to3'
 warning: no previously-included files found matching '.hgignore'
 warning: no previously-included files found matching '.hgtags'
 warning: no previously-included files found matching 'BUILDME.bat'
 warning: no previously-included files found matching 'make-manifest.py'
 warning: no previously-included files found matching 'SHIP'
 warning: no previously-included files found matching 'SHIP.bat'
 warning: no previously-included files matching '*' found under directory 'Tests'
 --- using frameworks at /System/Library/Frameworks
 unable to execute clang: No such file or directory
 error: Setup script exited with error: command 'clang' failed with exit status 1

Thanks for your time.
Alex

@inklesspen
Copy link

Your problem is actually a different error message, Alex. Your error is "unable to execute clang: No such file or directory". This probably means you don't have the developer tools installed.

@alexsani
Copy link

Sorry, thanks for the fast response. I read the last line and thought it was similar.
I'm new of mac and i miss apt-get :), i installed xcode from app store ... maybe there's more.
i''l inquire about it.
Thanks again.
Alex

@inklesspen
Copy link

You need to install the command-line tools as shown here: http://stackoverflow.com/questions/9329243/xcode-4-4-command-line-tools

@alexsani
Copy link

Great! Thanks again.
Alex

hugovk added a commit that referenced this issue Apr 1, 2015
Return fresh image is no mode specified and cached version otherwise
radarhere added a commit that referenced this issue Sep 9, 2020
Small optimisation: move distance==0 comparison to outer loop
hugovk pushed a commit that referenced this issue Apr 1, 2021
Changed list of single items dictionaries to dictionary
hugovk pushed a commit that referenced this issue Dec 6, 2023
Moved _Tile from Image to ImageFile
GerHobbelt pushed a commit to GerHobbelt/Pillow that referenced this issue Mar 18, 2024
…27922

Update changelogs with fixes that were already in, BE-584, BE-151, BE…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants