Unable to import python-mysqldb

2019-07-08 02:06发布

问题:

I installed python-mysqldb using

sudo apt-get install python-mysqldb

I have tried to use it unsuccessfully. The following commands do not work in Python prompt:

import python-mysqldb

Or

import mysqldb

How can I solve this problem?

回答1:

The package name is "MySQLdb". Case counts.