This error should occur if Trac tries to execute " import MySQLdb ", but it fails. You have the correct package that this module should provide, but for some reason it does not work. To find out why, you should look at the environment in which Trac runs. Is Python used other than /usr/bin/python2.6 ? Does he have a set of $PYTHONPATH ?
You can also try importing MySQLdb directly:
/usr/bin/python2.6 -c 'import MySQLdb'
This should not have an exit if the package can be downloaded as expected.
Finally, it may not be related, but you know that Maverick is no longer supported, right? It will not receive security updates or other support from Ubuntu.
Edit:
The python2.6 import worked fine, so we need to look closer to the trac environment. One way to do this is to edit the db/mysql_backend.py and insert some debugging information. (If this is an OS batch installation, you should find this file under /usr/lib/python2.6/dist-packages/trac/ , otherwise you probably know where you put it). Try changing the MySQLConnector.get_supported_schemes() method, as I'm not sure where the regular print will be displayed.
def get_supported_schemes(self): if not has_mysqldb: import sys self.error = "Cannot load Python bindings for MySQL. sys.path = %r, sys.executable = %r" \ % (sys.path, sys.executable) yield ('mysql', -1 if self.error else 1)
source share