在Snow Leopard上以32位模式运行时,“Python意外退出”

时间:2011-06-13 19:55:42

标签: python cgi matplotlib

我无法强制我的python以32位模式运行,我需要它来导入matplotlib。我从我的Apache日志中获取了这些信息(python脚本正在由Perl CGI脚本执行),它说“没有合适的64位架构”(参见" man python"用于32位运行)模式)"

当我做"默认写com.apple.versioner.python Prefer-32-Bit -bool yes"作为" man python"页面建议,我刚刚得到" Python意外退出"当我运行我的脚本。有人可以帮忙吗?

我在Snow Leopard 10.6.7上运行Python 2.6。 我还上传了OS X在崩溃时生成的大部分错误日志(如果我已将prefer-32-bit = 1设置为http://paste.pound-python.org/show/8090/

1 个答案:

答案 0 :(得分:0)

defaults write com.apple.versioner.python Prefer-32-Bit -bool yes仅在您的用户名下运行时才有效(并且在10.6中使用Apple提供的Python)。如果可以,请更改CGI脚本以这种方式调用Python:

arch -i386 /usr/bin/python2.6 ...
相关问题