I got this issue when I was working on SQLAlchemy. The default dialect used by SQLAlchemy for MySQL is mysql+mysqldb
.
engine = create_engine('mysql+mysqldb://scott:tiger@localhost/foo')
I got the "No module named MySQLdb
" error when the above command was executed. To fix it I installed the mysql-python
module and the issue was fixed.
sudo pip install mysql-python