(诊断)No module named MySQLdb

启动Keystone同步数据库时提示:

2015-04-16 10:53:24.010 5747 TRACE keystone   File "/usr/local/python2.7/lib/python2.7/site-packages/sqlalchemy/connectors/mysqldb.py", line 64, in dbapi

2015-04-16 10:53:24.010 5747 TRACE keystone     return __import__('MySQLdb')

2015-04-16 10:53:24.010 5747 TRACE keystone ImportError: No module named MySQLdb

2015-04-16 10:53:24.010 5747 TRACE keystone

要安装下面的软件解决:

# pip install mysql-python

 如果安装mysql-python时出现错误:“mysql_config not foud”,可以通过:

# apt-get install libmysqld-dev libmysqlclient-dev

来解决。

你可能感兴趣的:(mysqldb)