views:

247

answers:

1

I'm new to Macs (and quite new to Django) and I'm setting up an existing Django/MySQL site that uses Mercurial as a site package, on a new Macbook Pro.

All was going well during installation - no error messages. I installed the default versions of most packages from macports.

However when I try runserver, localhost shows the following error message:

ImportError at /
.../lib/python2.6/site-packages/mercurial/osutil.so: no appropriate 64-bit architecture (see "man python" for running in 32-bit mode)

Please could anyone advise? I've tried typing the following at the terminal:

defaults write com.apple.versioner.python Prefer-32-Bit -bool yes

but it didn't help.

+2  A: 

If everything from my comment checks out, try setting that Prefer-32-bit in an user environment variable instead of at the command line.

Edit this file: ~/.MacOSX/environment.plist

See:

http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/EnvironmentVars.html#//apple%5Fref/doc/uid/20002093-113982

gmoore
This solved the problem - thanks. Though I've now got another error message. But it's nice to have made some progress :)
Richard
Well, post away! I'll help if I can.
gmoore