Installing Django for Leopard with MySQL Support
I was following the instructions from Chapter 2 of the Django Book an online reference for learning and using Django, a Python web framework. My initial experience with Mac OS X Leopard (10.5.1) and adding open-source software has been a pleasure.
I have yet to encounter the dependency nightmare I have experienced with previous Mac OS X systems. Of course, I have also tamed my need for the absolute bleeding edge of software by avoiding nightly builds and the like, at least for time being.
Installing Django
Add MySQL Support to Python
Adding MySQL support for Python presented the only issue. A unexpected configuration error prevents the MySQLdb module from compiling and then a different issue throws a 'file not found' error when the module is loaded into Python.
I am not familiar enough with either system to say which developer has changed their installed path or even if it is some erroneous oversight on my part when originally installing MySQL or MySQLdb. In any case, here is what I need to do to complete the compile and install of MySQLdb for Mac OS X Leopard:
Update: Installing on Mac OS X Server Leopard 10.5
When compiling/installing MySQLdb for Mac OS X Server Leopard 10.5.x one will receive a different error for gcc about not being able to find my_conf.h. Because MySQL 5.0 is pre-installed in the Server addition this error stumped me until I read an Apple Support Article that explains that the client header files (.h) are not included with the Server edition for what I can only imagine is some sort of security preference.
Mac OS X (Client) Leopard does not come with MySQL pre-installed and the standard binary package for installing from MySQL includes the client and server files needed to interact with the service as well as the bits needed for MySQLdb. A small note that SQLite is supported by default as of Python 2.5+ and is the staple for use in many Cocoa applications for Mac OS X. For local application support or general 'tinkering' its pretty handy database, just not as fast as MySQL when it comes to dynamically serving content to web clients.
For future reference
System paths for Mac OS X Leopard (10.5) default pre-installed Python framework.
Start a New Project
Start the Development Server
Open Directory and .htpasswd
Fascinating! I worked on a project* once that involved a complete rewrite of the command-line utility passwd in order to keep a number of system services including a .htpasswd file in sync with users account passwords. Mac OS X Hints noted this is made simple with Mac OS X Leopard (10.5) and Open Directory.
Virtualized Xserver
Media Temple labs has a private beta for what it’s calling Xserve-Virtual . This system has been added quickly added to my MT wish list along with the Django GridContainer which, perhaps I wont need if I move over to a full-on-mirror of my development environment using a virtual OS X Server.
A virtual Mac OS X Leopard Server running on a fully loaded cluster of Xserves virtualized using Parallels Server . I want one, … or three, … yeah that should be enough …. maybe four, for symmetry.
Fedora 9 root password mismatch resolution
Having started my journey down the command-line with Fedora 3, I was excited to try out Fedora 9. The install completed with ease (the first time around) but once I logged onto the system and attempted to configure some of the system settings, my root password didn’t work.
Why? CAPS LOCK bit was set by default during the install process making a different root password.