[AstroPy] installation problems on a mac
Benjamin Alan Weaver
benjamin.weaver at nyu.edu
Wed Jun 25 13:47:17 EDT 2014
Hello Stephen,
I use the version of astropy in Macports, & it just works.
Kia ora koe,
Benjamin Alan Weaver
On Tue, Jun 24, 2014 at 8:11 PM, Stephen Bailey <stephenbailey at lbl.gov> wrote:
> Hello. I'm having difficulty installing astropy on a Mac (10.9.3, Xcode
> 5.1.1, EPD 7.3-1 python 2.7.3).
>
> The failure is rather basic: when installing via pip it can't find math.h;
> when installing from git source it can't find stdio.h (see details below).
> It suspiciously includes the gcc option:
>
> -isysroot /Developer-3.2.6/SDKs/MacOSX10.6.sdk
>
> which looks like it is trying to find a very old (and perhaps
> no-longer-existent?) XCode installation. That might be the original Xcode
> that was installed on this Mac 3 years ago, but has been upgraded multiple
> times since then. I'm not using macports.
>
> It should be looking in
>
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/math.h
>
> A simple hello.c program is able to find <stdio.h> without any special gcc
> options.
>
> Any ideas for why astropy is trying to use the wrong sysroot or whatever
> else might be wrong?
>
> Thanks for the help.
>
> Stephen Bailey
>
>
>
>
> FF:temp $ pip install --no-deps astropy
> ...
> Downloading/unpacking astropy
> Downloading astropy-0.3.2.tar.gz (6.4MB): 6.4MB downloaded
> Running setup.py egg_info for package astropy
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
>
> Installing collected packages: astropy
> Running setup.py install for astropy
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> building 'astropy.io.fits.compression' extension
> gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -isysroot
> /Developer-3.2.6/SDKs/MacOSX10.6.sdk -DNDEBUG -g -O3 -arch x86_64 -isysroot
> /Developer-3.2.6/SDKs/MacOSX10.6.sdk
> -I/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/numpy/core/include
> -Icextern/cfitsio
> -I/Library/Frameworks/EPD64.framework/Versions/7.3/include/python2.7 -c
> astropy/io/fits/src/compressionmodule.c -o
> build/temp.macosx-10.5-x86_64-2.7/astropy/io/fits/src/compressionmodule.o
> -Wno-unused-variable -Wno-parentheses -Wno-uninitialized -Wno-format
> -Wno-strict-prototypes -Wno-unused -Wno-comments -Wno-switch
> -Wno-declaration-after-statement
> astropy/io/fits/src/compressionmodule.c:93:10: fatal error: 'math.h'
> file not found
> #include <math.h>
> ^
> 1 error generated.
> error: command 'gcc' failed with exit status 1
> Complete output from command
> /Library/Frameworks/EPD64.framework/Versions/7.3/bin/python -c "import
> setuptools;__file__='/private/var/folders/lt/w2k_kx011kd7s2g9rk27xgzc0000gn/T/pip_build_sbailey/astropy/setup.py';exec(compile(open(__file__).read().replace('\r\n',
> '\n'), __file__, 'exec'))" install --record
> /var/folders/lt/w2k_kx011kd7s2g9rk27xgzc0000gn/T/pip-Sv1zUF-record/install-record.txt
> --single-version-externally-managed:
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
>
> running install
> ...
> creating build/temp.macosx-10.5-x86_64-2.7/cextern/cfitsio
>
> gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -isysroot
> /Developer-3.2.6/SDKs/MacOSX10.6.sdk -DNDEBUG -g -O3 -arch x86_64 -isysroot
> /Developer-3.2.6/SDKs/MacOSX10.6.sdk
> -I/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/numpy/core/include
> -Icextern/cfitsio
> -I/Library/Frameworks/EPD64.framework/Versions/7.3/include/python2.7 -c
> astropy/io/fits/src/compressionmodule.c -o
> build/temp.macosx-10.5-x86_64-2.7/astropy/io/fits/src/compressionmodule.o
> -Wno-unused-variable -Wno-parentheses -Wno-uninitialized -Wno-format
> -Wno-strict-prototypes -Wno-unused -Wno-comments -Wno-switch
> -Wno-declaration-after-statement
>
> astropy/io/fits/src/compressionmodule.c:93:10: fatal error: 'math.h' file
> not found
>
> #include <math.h>
>
> ^
>
> 1 error generated.
>
> error: command 'gcc' failed with exit status 1
>
> ----------------------------------------
> Cleaning up...
> Command /Library/Frameworks/EPD64.framework/Versions/7.3/bin/python -c
> "import
> setuptools;__file__='/private/var/folders/lt/w2k_kx011kd7s2g9rk27xgzc0000gn/T/pip_build_sbailey/astropy/setup.py';exec(compile(open(__file__).read().replace('\r\n',
> '\n'), __file__, 'exec'))" install --record
> /var/folders/lt/w2k_kx011kd7s2g9rk27xgzc0000gn/T/pip-Sv1zUF-record/install-record.txt
> --single-version-externally-managed failed with error code 1 in
> /private/var/folders/lt/w2k_kx011kd7s2g9rk27xgzc0000gn/T/pip_build_sbailey/astropy
> Storing complete log in /Users/sbailey/.pip/pip.log
>
>
>
>
>
>
> FF:astropy $ python setup.py build
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> running build
> running build_py
> running build_ext
> building 'astropy._compiler' extension
> gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -isysroot
> /Developer-3.2.6/SDKs/MacOSX10.6.sdk -DNDEBUG -g -O3 -arch x86_64 -isysroot
> /Developer-3.2.6/SDKs/MacOSX10.6.sdk
> -I/Library/Frameworks/EPD64.framework/Versions/7.3/include/python2.7 -c
> astropy/_compiler.c -o build/temp.macosx-10.5-x86_64-2.7/astropy/_compiler.o
> In file included from astropy/_compiler.c:1:
> /Library/Frameworks/EPD64.framework/Versions/7.3/include/python2.7/Python.h:33:10:
> fatal error:
> 'stdio.h' file not found
> #include <stdio.h>
> ^
> 1 error generated.
> error: command 'gcc' failed with exit status 1
>
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
--
a.k.a. The Dream Weaver
Outside of a dog, a book is man's best friend. Inside of a dog it's
too dark to read.
--Groucho Marx
More information about the AstroPy
mailing list