试图在Mac OS X 10.8.4上安装ephem-3.7.5.1

时间:2013-09-15 04:18:44

标签: python pyephem

当我执行安装脚本时,我得到以下内容:

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

任何线索?感谢

2 个答案:

答案 0 :(得分:0)

不是尝试调试报告的错误,而是使用起来可能更容易:

sudo pip install pyephem

如果您没有安装pip,您应该使用easy_install获取它,但您也可以使用INSTALL指令中建议的其他命令安装它:

sudo easy_install ephem

答案 1 :(得分:0)

.h文件是一个基本的C标准库文件,因此它的缺席表明您的问题可能是您缺少系统C编译器的完整安装。尝试安装我认为你可以在这里找到的Xcode命令行工具:

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

类似的Stack Overflow提问者发现,从源代码构建Python本身也是必要的:

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

更新:以下命令也可能有所帮助,所以这里只是以下情况:

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

相关问题