First I'll point you in the right direction for installing the required Python libraries. First you'll need to install the pySerial library. Simply put, the pySerial library allows your Python script to talk with the serial port in which the Arduino is connected. I.e. you can kind of think of it as a stream connecting the Arduino code to the Python code (insert other silly analogies here).
1. You can download the pySerial library here: https://pypi.python.org/pypi/pyserial
2. For mac or linux users, download the file and extract it. Open terminal and cd into the extracted folder and run the following command:
python setup.py install
This will install the pySerial package. (screen shot below)
Next, we will install the library to allow Python to talk with MySQL called MySQLdb.
I just want to note, this step can be very annoying, but very rewarding once completed. I have included a guide for you to follow, but I recommend you have MySQL, python, and XCode(or the latest GCC) installed before you try and install MySQLdb.
1. download the library from source forge:
2. If you're lucky enough, you should just be able to download it, extract it, open Terminal, cd into the folder and run python setup.py install, just as you did before. If this works, you're awesome and you should awesome, but if not, this guide should help. Note, I had to do step 6 before step 3. http://stackoverflow.com/questions/1448429/how-to-install-mysqldb-python-data-access-library-to-mysql-on-mac-os-x