Installing Django and MySQL on Mac OS X 10.7 from a fresh install.
In point form, because I'm in a hurry:
- Log in, make sure you have admin privileges
- Install MacPorts
- Add /opt/local to the "Privacy" list in Spotlight preferences (to stop Spotlight indexing all the source and slowing down installs by a factor of three)
- Install the various versions of Python you expect to be using
- Install the various versions of pyXX-virtualenv you need
- Install the various versions of pyXX-virtualenvwrapper you need
- sudo port install mysql5 +server
- sudo /opt/local/lib/mysql5/bin/mysql_install_db --user=mysql
- sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
- /opt/local/bin/mysqld_safe5
- /opt/local/lib/mysql5/bin/mysql_secure_installation
- cd /opt/local/bin ; ln -s mysql_config5 mysql_config # This gets around the Django installation crash with "EnvironmentError: mysql_config not found"
- select the version of Python you wish to use for this virtual environment: sudo port select --set python pythonXX
- mkvirtualenv Django-X.X
- easy_install pip
- pip mysql-python
- pip install Django==X.X
Comment here if you'd find more information useful. I'll add more detail at your request.
MySQL Setup borrowed from