0

Guys I installed mySQLdb in Ubuntu with:

mydeskt@mydeskt-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?

Edited by HoneyBadger: n/a

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by HoneyBadger
1

You misspelled it.

import MySQLdb

The directory's name containing a file named __init__.py can be imported.

0

You misspelled it.

import MySQLdb

The directory's name containing a file named __init__.py can be imported.

sir, you are a life saver. :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.