6

I'm trying to get a django site deployed from a repository. I was almost there, and then changed something (I'm not sure what!!) and was back to square one.

Now I'm trying to run ./manage.py syncdb and get the following error:

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: this is MySQLdb version (1, 2, 3, 'final', 0), but _mysql is version (1, 2, 2, 'final', 0)

I've searched forums for hours and none of the solutions presented helped. I tried uninstalling and re-installing MySQL-python and upgrading it. I get the same error when trying to import it from the python command line interpreter.

Does anyone have any suggestions?

1
  • 1
    What version of mysql do you have? You say you've tried uninstalling and reinstalling mysql-python, but have you tried that with mysql? When I had problems with mysqldb I had to switch mysql versions. Commented Aug 21, 2011 at 10:42

2 Answers 2

2

I got the same problem after installing mysql-python using pip. Seems to be an error in the pip package. I solved it by pip uninstall'ing it again, after which i downloaded and installed the package manually like this:

Sign up to request clarification or add additional context in comments.

Comments

1

For those who come upon this question:

It turns out that ubuntu _mysql version was different from the one in my venv. Uninstalling that and re-installing in my venv did the trick.

1 Comment

How do you uninstall and reinstall _mysql? Is it the same as just reinstalling all of MySQL itself?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.