Opening sentence of the Open Business track of iSummit 08
“Open Business is still Business” - Jon Phillips
“Open Business is still Business” - Jon Phillips
I’m testing the new wordpress iPhone app, and it rocks! The UI is neat while still exposing a lot of features so congrats to the wp devs!
Seems like no week passes without a new concert appearing on my google calendar ;-)
Like many others, I struggled for a good hour to install the recommended MySQL module for Python, which is MySQLdb. So I’m sharing here the solution I found ;-)
The latest MAMP (1.7.1) uses MySQL 5.0.41, and MacOS X Leopard (10.5) uses Python 2.5.1 . As I couldn’t find a prebuilt MySQLdb binary for those versions, well, I had to compile my own.
So let’s go for it :
$ tar zxvf mysql-5.0.41.tar.gz
$ cd mysql-5.0.41
$ ./configure && make
$ sudo make install
$ cd ..
(now MySQL is installed in /usr/local/)
$ tar zxvf MySQLdb...
$ cd MySQLdb...
#ifndef uint
#define uint unsigned int
#endif
(Still in the MySQLdb folder)
$ python setup.py clean
$ python setup.py build
$ sudo python setup.py install
$ sudo rm /tmp/mysql.sock
$ sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
And that’s it! You should now be able to “import MySQLdb” in python. Good luck!