开发者

How to specify the SDK version used when installing a Python package on Mac OS X?

I'm trying to install python-ldap on Mac OS X 10.6, but I get this error because it's using 10.4u.sdk instead of 10.6.sdk. How can I specify the SDK version to be used? So far, I tried specifying the MACOSX_DEPLOYMENT_TARGET开发者_JAVA百科 env variable to 10.6 and SDKROOT to /Developer/SDKs/MacOSX10.6.sdk, but 10.4u.sdk was stil used. Any help is appreciated.


When installing Python packages with C extension modules on Mac OS X, Python will automatically use the SDK and deployment target with which the interpreter was built. Presumably you are using a 32-bit-only Python, perhaps from one of the python.org installers. These Pythons are built using the 10.4u SDK for compatibility with older systems. If you are using Xcode 3, the 10.4u SDK is not installed by default but you can run the Xcode 3 installer and select it. If you are using Xcode 4, you're probably out of luck as it does not include the 10.4u SDK (or so I understand). You can install a newer 64-bit/32-bit 10.6-only Python 2.7 from python.org or you could use the Apple-supplied Python 2.6 (/usr/bin/python2.6).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜