gpt4 book ai didi

macos - 用貌似不存在的SDK编译 :/Developer/SDKs/MacOSX10. 6.sdk

转载 作者:行者123 更新时间:2023-12-04 04:14:25 26 4
gpt4 key购买 nike

我正在尝试使用以下命令为 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

即使我安装了 xcode 4.5.1,文件 /Developer/SDKs/MacOSX10.6.sdk 似乎也不见了。

Apple 主页上的“Apple 开发人员下载”中没有名为MacOSX10.6.sdk 的文件。我该怎么办?

附言。如果我不指定 python3,一切都很好。

最佳答案

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

我建议转储你安装的 python3 并通过 macports 安装它,它将使用最新的 Xcode 构建其端口,因此能够编译其他 python 模块。

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

$ sudo port install python33

也有很好的机会可以通过简单地安装这些 python 模块:

$ sudo port install whizzopymod

编辑:将最后一部分划为 macports doesn't have rpy2 for python3 .我猜你必须继续使用 easy_install

关于macos - 用貌似不存在的SDK编译 :/Developer/SDKs/MacOSX10. 6.sdk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13178686/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com