1

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 -bool 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/

Chas
  • 11
  • 2
  • Did you install the version of Python you're trying to use? If so, did you install it from source or the OS X installer? Have you considered trying to run 2.5 or 2.7 in 32 bit mode to see if you have the same issues? – BenTrofatter Jun 13 '11 at 21:21

1 Answers1

0

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 ...
Ned Deily
  • 83,389
  • 16
  • 128
  • 151