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
- Install MySQL from source like Dan says but use the latest version of MySQL (5.1.42 in my case) instead of the version he says to use.
- Install MySQL-Python like the top answer on this Stack Overflow question.
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
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
@matt I should do that, but I haven’t really gotten my head around how to get that setup.
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?