python setup.py 的编译器选项错误

发布于 2024-08-25 00:59:54 字数 178 浏览 12 评论 0原文

我正在尝试在我的 mac 设置上安装 matplotlib。我发现 setup.py 的标志不准确,特别是 isysroot 指向早期的 SDK。

setup.py 从哪里获取其信息以及如何修复它?

我使用的是 MacOS 10.5.8、XCode 3.1.2 和 Python 2.6(默认配置为 2.5)

I'm trying to install matplotlib on my mac setup. I find that setup.py has inaccurate flags, in particular the isysroot points to an earlier SDK.

Where does setup.py get its info and how can i fix it?

I'm on MacOS 10.5.8, XCode 3.1.2 and Python 2.6 (default config was 2.5)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

在你怀里撒娇 2024-09-01 00:59:54

我猜您已经使用 python.org OS X 安装程序在 10.5 上安装了 2.6。在这种情况下,标志是准确的,您不应尝试更改它们。 python.org 安装程序是使用所谓的 10.4u SDK 构建的,部署目标为 10.3,允许一个安装程序映像在从 10.3.9 到 10.6(甚至可能更高)的 Mac OS X 系统上运行。 Python 2.6 的最新版本已得到修复,以确保在 OS X 上构建的扩展模块强制 C 编译器选项与底层 Python 的选项相匹配,因此您需要确保安装 10.4u SDK(或其他),如果需要从 Xcode 包(在 OS X 发行版 CD/DVD 上或从 Apple Developer Connection 网站下载)中获取。它还将确保您使用的是 gcc-4.0,这也是 10.5 上的默认值。

I'm guessing you've installed 2.6 on 10.5 using the python.org OS X installer. In that case, the flags are accurate and you should not try to change them. The python.org installers are built using the so-called 10.4u SDK and with a deployment target of 10.3, allowing one installer image to work on Mac OS X systems from 10.3.9 up through 10.6 (and possibly beyond). The most recent releases of Python 2.6 have been fixed to ensure that extension module building on OS X forces the C compiler options to match those of the underlying Python so you'll need to make sure you install the 10.4u SDK (or whatever) if necessary from the Xcode package (on the OS X release CD/DVD or downloaded from the Apple Developer Connection website). It will also make sure you are using gcc-4.0, which is also the default on 10.5.

Hello爱情风 2024-09-01 00:59:54

setup.py 从 Python 安装中获取其信息,特别是 distutils 包,从中导入至少一些功能。

distutils.ccompiler 提供抽象基类CCompiler 描述您的 C 编译器。对于 gcc,典型的具体类位于 distutils.unixcompiler 中 我认为您应该特别从这里开始检查 Mac。

如果它可以帮助您了解 Mac OS X 10.5 与下一个但最新的 XCode(我无法安装最新的,因为它仅限 10.6)中的情况如何,我将很高兴分享有关我的安装 - 但我认为如果您告诉我们您安装了哪个 Mac OS X 版本、哪个 XCode 版本等等,会更有帮助!-)

了解您是否安装也很重要正在使用系统提供的 Python,一个 macports,一个从 python.org 安装的(以及,哪一个;-),等等 —— 当然,每个都可能有自己的安装问题,但它们往往是彼此不同!-)

setup.py gets its info from your installation of Python, specifically the distutils package of the standard library, from which it imports at least some functionality.

distutils.ccompiler provides the abstract base class CCompiler describing your C compiler. For gcc, the typical concrete class is in distutils.unixcompiler and I think that's where you should start checking for the Mac in particular.

If it can help you to see how things are in a perfectly working Mac OS X 10.5 with the next-but-latest XCode (I can't install the latest one as it's 10.6-only) I'll be glad to share info about my installation -- but I think it would be more helpful if you told us about what Mac OS X release, what XCode release, etc etc, you have installed!-)

It's also important to know whether you're using the system-provided Python, a macports one, one installed from python.org (and, which one;-), and so forth -- each may have its own installation problems of course, but they'll tend to be different from each other!-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文