Trying to install ephem-3.7.5.1 on Mac OS X 10.8.4

1.2k views Asked by At

When I execute the install script, I get the following:

creating build/temp.macosx-10.6-intel-3.3/extensions/data
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -arch i386 -arch x86_64 -Ilibastro-3.7.5 -I/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m -c extensions/_libastro.c -o build/temp.macosx-10.6-intel-3.3/extensions/_libastro.o
In file included from extensions/_libastro.c:3:
/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m/Python.h:25:10: fatal error: 
      'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
error: command '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' failed with exit status 1

Any clues? Thanks

2

There are 2 answers

0
beroe On

Rather than try to debug your reported error, it is probably easier to just to use:

sudo pip install pyephem

If you don't have pip installed, you should get it using easy_install, but you could also just install it with the other command recommended in the INSTALL instructions:

sudo easy_install ephem
0
Brandon Rhodes On

That .h file is a fundamental C standard library file, so its absence indicates that your problem may be that you are missing the full install of your system's C compiler. Try installing the Xcode command line tools that I think you can find here:

https://developer.apple.com/xcode/

A similar Stack Overflow questioner found that they were also necessary to build Python itself from source:

fatal error 'stdio.h' Python 2.7.3 on Mac OS X 10.7.5

Update: the following command might also help, so here it is just in case:

http://www.bitemyapp.com/post/os-x-fsevent-fatal-error-stdio-h-file-not-found/