View Full Version : Installing mySQLdb in Ubuntu

March 2nd, 2012, 04:22 AM
Guys I installed mySQLdb in Ubuntu with:

mycomp@mycomp-desktop:~$ sudo apt-get install python-mysqldb but when I go to the python interpreter and type:

>>> import mySQLdb I get:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mySQLdb
It is installed though, because when I go to:

System > Administration > Synaptic Package Manager and type mysql I can see:

python-mysqldb as installed.

why does it not work?

March 2nd, 2012, 04:41 AM

Check the capitalization in your import statement.