Ask Your Question
0

Error loading MySQLdb module: No module named MySQLdb

asked 2012-02-28 03:40:08 -0600

tungns-inf gravatar image

I am trying to install Dashboard following this guide http://wiki.openstack.org/OpenStackDashboard (http://wiki.openstack.org/OpenStackDa...) . When I sync database, I had this error:

tools/with_venv.sh openstack-dashboard/manage.py syncdb

File "/home/user1/horizon/.venv/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 14, in <module> raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

I use Ubuntu server 11.10 amd64 and I installed "python-mysqldb". When I test in Python interpreter, it's ok.

import MySQLdb

I also tried to install by: ~/horizon# easy_install MySQL-python but it only returns that:

Searching for mysql-python Best match: MySQL-python 1.2.3 MySQL-python 1.2.3 is already the active version in easy-install.pth

Using /usr/lib/pymodules/python2.7 Processing dependencies for mysql-python Finished processing dependencies for mysql-python

What's wrong in this case? Thank you!

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2012-02-28 09:57:35 -0600

tungns-inf gravatar image

Thanks Rafael Durán Castañeda, that solved my question.

edit flag offensive delete link more
0

answered 2012-02-28 08:56:29 -0600

rafadurancastaneda gravatar image

Hi,

I think you didn't install MySQL-python on your virtualenv, If I'm right you can install just doing:

$ source .venv/bin/activate $ pip install MySQL-python

or:

$ tools/with_venv.sh pip install MySQL-python

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-02-28 03:40:08 -0600

Seen: 884 times

Last updated: Feb 28 '12