开发者

"Python quit unexpectedly" when running in 32-bit mode on Snow Leopard

开发者 https://www.devze.com 2023-03-12 09:25 出处:网络
I have been unable to force my python to run in 32 bit mode, which I need for it to import matplotlib.I got this information from my Apache log (the python script is being executed by a Perl CGI scrip

I have been unable to force my python to run in 32 bit mode, which I need for it to import matplotlib. I got this information from my Apache log (the python script is being executed by a Perl CGI script) which says "no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)."

When I do "defaults write com.apple.versioner.python Prefer-32-Bit -boo开发者_开发知识库l yes" as the "man python" page suggests, I just get "Python quit unexpectedly" when I run my script. Can anyone help?

I'm running Python 2.6 on Snow Leopard 10.6.7. I've also uploaded most of the error log generated by OS X when it crashes (if I've set the prefer-32-bit = 1) at http://paste.pound-python.org/show/8090/


The defaults write com.apple.versioner.python Prefer-32-Bit -bool yes only works when running under your username (and with the Apple-supplied Python in 10.6). If you can, change your CGI script to invoke Python this way:

arch -i386 /usr/bin/python2.6 ...
0

精彩评论

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