使用似乎不存在的SDK进行编译:/Developer/SDKs/MacOSX10.6.sdk [英] Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.6.sdk
问题描述
我正在尝试使用以下命令为Python3安装rpy2:
I'm trying to install rpy2 for Python3 with the following command:
easy_install-3.2 rpy2
这会给出一些警告和错误:
This gives a few warnings and an error:
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
即使我安装了xcode 4.5.1,文件/Developer/SDKs/MacOSX10.6.sdk
似乎也丢失了.
The file /Developer/SDKs/MacOSX10.6.sdk
seems to be missing even though I have xcode 4.5.1 installed.
Apple主页上的"Apple开发人员下载"中没有名为MacOSX10.6.sdk
的文件.我该怎么办?
There is no file called MacOSX10.6.sdk
in the "Downloads for Apple Developers" on the Apple home page. What do I do?
Ps.如果我不指定python3,一切都很好.
Ps. It all works well if I do not specify python3.
推荐答案
正在发生的事情是python是使用Xcode的4.3之前版本构建的,该工具和SDK已安装在/Developer
中. Xcode 4.3不再是这种情况,在Xcode 4.3中,工具和SDK是Xcode.app捆绑包的一部分.看起来python是使用gcc而不是clang编译的.
What is happening is that python was built with a pre-4.3 version of Xcode where the tools and SDKs were installed in /Developer
. This is no longer the case with Xcode 4.3 where the tools and SDKs are part of the Xcode.app bundle. It also looks like python was compiled using gcc rather than clang.
我建议转储您拥有的python3安装,并通过 macports 安装,它将使用最新的Xcode进行构建它的端口,因此将能够编译其他python模块.
I would recommend dumping the installation of python3 you have and installing it via macports, which will use the latest Xcode to build its ports and will therefore be able to compile additional python modules.
一旦安装了Macports,只需执行以下操作:
Once you have installed macports, simply do:
$ sudo port install python33
只需执行以下操作即可安装这些python模块:
There is also a good chance those python modules can be installed by simply doing:
$ sudo port install whizzopymod
将最后一部分作为Macports抓取没有用于rpy2的python3 .我猜你将不得不继续使用easy_install
.
Scratch that last part as macports doesn't have rpy2 for python3. You'll have to continue using easy_install
I guess.
这篇关于使用似乎不存在的SDK进行编译:/Developer/SDKs/MacOSX10.6.sdk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!