[Fixed]-ImproperlyConfigured: Error loading MySQLdb module: this is MySQLdb version (1, 2, 5, 'final', 1), but _mysql is version (1, 2, 4, 'beta', 4)?

1👍

1.2.4b4 is indeed, at the time of this writing, the latest MySQLdb version that app engine supplies in production. You give no details about your setup, but if you’re installing in a virtual environment from that requirements.txt, it’s quite possible that a MySQLdb.py file be among the Python files you’re uploading to GAE production: make sure to not do that, so that import MySQLdb will get the version supplied by GAE itself (with the appropriate specification in your app.yaml, of course).

Locally, develop with 1.2.4, to avoid accidentally using 1.2.5 features that 1.2.4 does not provide; but, most important, don’t end up with a MySQLdb.py file in the directory tree you upload to app engine.

If you provide the relevant details of your app.yaml and of the directory tree that you’re uploading, you may make it possible for us to supply more, and more specific, help and information. Based on the very scant info you chose to provide in your question, this is the best we can do, so far.

Leave a comment