Python2.6 and Snow Leopard. Problem installing appscript (and MANY other packages)

十年热恋 提交于 2019-12-06 15:29:22

问题


I've been having nothing but trouble with python2.6 and Snow Leopard. One major problem is 32 vs 64-bit libraries.

The other manifests itself like this:

tppllc-mbp15$ sudo easy_install-2.6 appscript
Searching for appscript
Reading http://pypi.python.org/simple/appscript/
Reading http://appscript.sourceforge.net
Best match: appscript 0.21.1
Downloading http://pypi.python.org/packages/source/a/appscript/appscript-0.21.1.tar.gz#md5=351f3e493f9259516fce6eecde155195
Processing appscript-0.21.1.tar.gz
Running appscript-0.21.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-DiXejT/appscript-0.21.1/egg-dist-tmp-brxccx
Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.4u.sdk
Please check your Xcode installation
ld: library not found for -lbundle1.o
collect2: ld returned 1 exit status
ld: library not found for -lbundle1.o
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccO2E68V.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1

Does anyone have any idea where that "Compiling with an SDK that doesn't seem to exist: /Developer/SDKs/MacOSX10.4u.sdk" is coming from? There's no mention of 10.4 in any of the files for this project.

appscript isn't the only project that fails, just one of many.

I tried reinstalling xcode, and my entire operating system--starting on a clean machine--and there are problems.

If I install the package under python2.5 it works. That's my solution for now: to stay with python 2.5


回答1:


It appears you have likely installed a python 2.6 from python.org or some other 3rd-party installer. The python.org python's are currently built only as 32-bit (i386 and ppc) and are compatible with OS X 10.3 through 10.6. To do that, they are built with the 10.4u SDK which is available via the 10.6 Xcode installer (on the 10.6 Installation DVD and elsewhere), however that SDK is not installed by default. Run the 10.6 Xcode installer again and select it. Then builds of python packages with C extension module should work fine.

Another solution is to just stick with the Apple-supplied Python 2.6.1 in 10.6 (which runs as 64-bit by default) in which case you need to fix your $PATH or be careful to use /usr/bin/easy_install-2.6.



来源:https://stackoverflow.com/questions/2169987/python2-6-and-snow-leopard-problem-installing-appscript-and-many-other-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!