PDA

View Full Version : Installing mySQLdb in Ubuntu



HoneyBadger1
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?

JDShu
March 2nd, 2012, 04:41 AM
http://www.kitebird.com/articles/pydbapi.html

Check the capitalization in your import statement.