0

我需要为 Python 编译 64 位库(例如 SIP)而不是 32 位,由我的旧 32 位 Mac 编译,以便在新 Mac 上使用 .app bandle。

看起来像放置在这里的类似问题 是否可以在 Ubuntu 下的 32 位系统上编译 64 位可执行文件?

但它看起来像是一种非常缓慢的调整方式,但我需要许多库来重建 - 原因是使用 py2app 创建一个独立的应用程序。

所有我发现降级这种过程 - 从 64 到 32 喜欢

# python configure.py --arch=i386 -d /Library/Python/2.6/site-packages

从这里http://www.oak-tree.us/blog/index.php/2009/05/12/pyqt-mac

# python configure.py --arch=x86_64 -d /Library/Python/2.6/site-packages

在 32 位系统 - 无济于事 - 将应用程序包中的 sip.so 替换为刚刚编译的文件后,我得到相同的错误“sip.so: mach-o, but wrong architecture”

感谢您的帮助!

4

1 回答 1

0

You will need to rebuild your entire python distribution, including all the packages as 32 bit architecture. It might be easiest to do this on the old Mac you're developing for. It's not going to be fast, but it it is not complicated.

于 2011-10-16T12:39:49.570 回答