使用似乎不存在的SDK编译:/Developer/SDKs/MacOSX10.6.SDK

使用似乎不存在的SDK编译:/Developer/SDKs/MacOSX10.6.SDK,macos,python-3.x,easy-install,rpy2,Macos,Python 3.x,Easy Install,Rpy2,我正在尝试使用以下命令安装Python3的rpy2: easy_install-3.2 rpy2 这会给出一些警告和一个错误: warning: no previously-included files matching '*patch*' found anywhere in distribution warning: no previously-included files matching '*diff*' found anywhere in distribution warning: n

我正在尝试使用以下命令安装Python3的rpy2:

easy_install-3.2 rpy2
这会给出一些警告和一个错误:

warning: no previously-included files matching '*patch*' found anywhere in distribution
warning: no previously-included files matching '*diff*' found anywhere in distribution
warning: no previously-included files matching '.hg' found anywhere in distribution
no previously-included directories found matching 'dist'
gcc-4.2 not found, using clang instead
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
Please check your Xcode installation
build/python3_rpy/rpy/rinterface/_rinterface.c:51:10: fatal error: 'signal.h' file not found
#include <signal.h>
         ^
1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
文件/Developer/SDKs/MacOSX10.6.sdk似乎丢失了,尽管我已经安装了xcode 4.5.1

苹果主页上的苹果开发者下载中没有名为MacOSX10.6.sdk的文件。我该怎么办


Ps.如果我不指定python3,一切都会很好。

现在的情况是,python是用4.3之前版本的Xcode构建的,工具和SDK安装在/Developer中。在Xcode 4.3中,工具和SDK不再是Xcode.app包的一部分。看起来python也是使用gcc而不是clang编译的

我建议您卸载python3的安装并通过安装,它将使用最新的Xcode构建端口,因此能够编译额外的python模块

安装macports后,只需执行以下操作:

$ sudo port install python33
通过简单地执行以下操作,也很有可能安装这些python模块:

$ sudo port install whizzopymod

编辑:将最后一部分作为macports进行划伤。我想您必须继续使用easy_install。

运行xcode select-print path时会显示什么?另外,python是如何安装在您的系统上的?@trojanfoe xcode select-print path gives/Applications/xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer和python3是从我的64位osx版本中获得的,我发现了一个类似的线程,但解决方案是下载文件MacOSX10.4u.sdk,但10.6Thanks不存在等效文件。我无法卸载Python3权限被拒绝的符号链接,即使是sudo。我需要在重新安装之前执行此操作吗?将很快接受答案,只需先尝试一下。@TheUnfunCat这可能会有所帮助:@TheUnfunCat:请坚持回答中指定Python 3.3的部分。此时,Rpy2还没有在Python3.2下进行测试,Python3.2的生命周期可能相对较短—3.3是现在的发展方向