Forums

No module named MySQLdb error

Greetings, I keep getting this error and I just don't know what could be causing it. The MySQLdb Python plugin is installed.

2015-08-20 13:33:24,606 :Traceback (most recent call last): 2015-08-20 13:33:24,607 : File "/bin/user_wsgi_wrapper.py", line 130, in call

2015-08-20 13:33:24,607 : self.error_log_file.logger.exception("Error running WSGI application")

2015-08-20 13:33:24,607 : File "/usr/lib/python2.7/logging/init.py", line 1185, in exception

2015-08-20 13:33:24,607 : self.error(msg, args, *kwargs)

2015-08-20 13:33:24,607 : File "/usr/lib/python2.7/logging/init.py", line 1178, in error

2015-08-20 13:33:24,607 : self._log(ERROR, msg, args, **kwargs)

2015-08-20 13:33:24,607 : File "/usr/lib/python2.7/logging/init.py", line 1270, in _log

2015-08-20 13:33:24,608 : record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, func, extra)

2015-08-20 13:33:24,608 : File "/usr/lib/python2.7/logging/init.py", line 1244, in makeRecord

2015-08-20 13:33:24,608 : rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)

2015-08-20 13:33:24,608 : File "/usr/lib/python2.7/logging/init.py", line 284, in init

2015-08-20 13:33:24,608 : self.threadName = threading.current_thread().name

2015-08-20 13:33:24,608 : File "/usr/lib/python2.7/threading.py", line 1160, in currentThread

2015-08-20 13:33:24,608 : return _active[_get_ident()] 2015-08-20 13:33:24,609 : File "/bin/user_wsgi_wrapper.py", line 122, in call

2015-08-20 13:33:24,609 : app_iterator = self.app(environ, start_response)

2015-08-20 13:33:24,609 : File "/bin/user_wsgi_wrapper.py", line 136, in import_error_application

2015-08-20 13:33:24,609 : raise e

2015-08-20 13:33:24,609 :django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

Anyone knows what could be causing this?

Thank you very much!

It looks like your web app is using a virtualenv -- how did you install MySQLdb? Are you sure you were in the virtualenv when you installed it? I see you sent a "Send feedback" message earlier where you say that MySQL-python was already installed, but if you're using a virtualenv then it won't have been in there, so perhaps you tried to install it from a bash console that wasn't in the virtualenv?

Thank you very much for your reply! It worked!

Awesome, thanks for confirming!