Categorized: Apple, Database, Django, Python

This is a bit crusty. A new post about using virtualenvs and pip is forthcoming.

Getting Django + MySQL running again on Snow Leopard

Previously…

  • Install the latest Xcode Tools from your Snow Leopard installation DVD
  • Re symlink things to /Library/Python/2.6/site-packages (Leopard used 2.5)
    • Django
    • Any other thing you had symlink’d in 2.5

MySQL + Python

After all that Sequel Pro is still showing the version of MySQL as 5.1.33, but it seems to be working…

PIL

This was by far the biggest headache. I finally found a solution:

Install like this, but before running sudo python setup.py install, do this:

LDFLAGS="-arch ppc -arch i386 -arch x86_64" CFLAGS="-arch ppc -arch i386 -arch x86_64" python setup.py build

If you already had PIL installed and had the source files you compiled from before, be sure to delete them and start fresh from a new Imaging-1.1.6.tar.gz.

Comments

matt → January 5th, 2010 at 1:50 pm

Instead of linking things directly to site-packages, you could use virtualenv. The benefit is that you can have multiple versions of the same package installed in different environments

Trey → January 5th, 2010 at 2:51 pm

@matt I should do that, but I haven’t really gotten my head around how to get that setup.

Jürgen → January 6th, 2010 at 5:28 am

Thanks for the hints. Even if I follow your PIL installation tips to the “T”, I am still getting this “_imaging C module is not installed” message:

% python selftest.py

* The _imaging C module is not installed

I am giving up on getting Django ever to run on Snow Leopard.

What do you think about that?

Elsewhere in the empire: Home, Blog, APOD