FW: MySQLdb version doesn't match _mysql version

1,283 views
Skip to first unread message

Hadassa Golovenshitz

unread,
Aug 21, 2011, 4:08:57 AM8/21/11
to django...@googlegroups.com

 

Hi everyone,

Thank you for taking the time to look at my question.

 

I’m setting up a django project that I got from a code repository, and in trying to run ./manage.py syncdb I 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 get the same error when running import MySQLdb at the python command line interpreter. Does anyone have any ideas? I’ve spent hours searching for similar posts, but no solutions seem to help me.

 

I’d appreciate any suggestions!



__________ Information from ESET NOD32 Antivirus, version of virus signature database 6397 (20110821) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature database 6397 (20110821) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Ramiro Morales

unread,
Aug 21, 2011, 9:20:04 AM8/21/11
to django...@googlegroups.com
On Sun, Aug 21, 2011 at 5:08 AM, Hadassa Golovenshitz <hgo...@gmail.com> wrote:
>
>
> Hi everyone,
>
> Thank you for taking the time to look at my question.
>
>
>
> I’m setting up a django project that I got from a code repository, and in
> trying to run ./manage.py syncdb I 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).

Seems you mysqldb (the Python DB-API 2.0 compatible library to access
MySQL databases) installation is borked.

mysqldb is composed of two layers:

_mysql is a low level one, a more or less thin wrapper over the C mysql client
libraries.

On top of that there is mysldb itself, that uses the services of _mysql
and implemets the DB-API specification.

You seem to have a a corrupt copy because both pieces are released together,
and when a correct installation has been performed, they are built and installed
together with matching version IDs.

You might find better answers in a mailing list or IRC channel
devoted to mysqldb. This isn't a Django -related or -specific issue.

Regards,

--
Ramiro Morales

Cal Leeming [Simplicity Media Ltd]

unread,
Aug 22, 2011, 3:45:05 AM8/22/11
to django...@googlegroups.com

Hold on, i would say this is a django-related question (albeit not related to a problem within django). OP - try removing and reinstalling mysqldb on your python install and/or env.

> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>

Kejun He

unread,
Aug 22, 2011, 4:18:58 AM8/22/11
to django...@googlegroups.com
Did you install python-mysqldb  in your mechine??

hg

unread,
Aug 22, 2011, 9:44:56 AM8/22/11
to Django users
Hi All,
Thanks for taking the time to respond to my question.
Cal: I did try uninstalling and re-installing.
Kejun: Yes, it's installed.


On Aug 22, 11:18 am, Kejun He <printer...@gmail.com> wrote:
> Did you install python-mysqldb  in your mechine??
>
> On Mon, Aug 22, 2011 at 3:45 PM, Cal Leeming [Simplicity Media Ltd] <
>

Cal Leeming [Simplicity Media Ltd]

unread,
Aug 22, 2011, 9:57:07 AM8/22/11
to django...@googlegroups.com
Do this:

import sys
print sys.path

Then paste result

Thanks

Cal Leeming

unread,
Aug 22, 2011, 9:56:58 AM8/22/11
to django...@googlegroups.com
Do this:

import sys
print sys.path

Then paste result

Thanks

Cal

On Mon, Aug 22, 2011 at 2:44 PM, hg <hgo...@gmail.com> wrote:

damola oyeniyi

unread,
Aug 22, 2011, 11:03:48 AM8/22/11
to django...@googlegroups.com

Is there documentation available on how to use the django-sms -gateway API? I am new to django entirely, even slightly new to web development, but I have a model that might not need webpages if I get my sms application right. At least I can to push a demo to my investors, before I take time to learn templating languages etc

Kejun He

unread,
Aug 22, 2011, 11:08:48 AM8/22/11
to django...@googlegroups.com
On Mon, Aug 22, 2011 at 9:44 PM, hg <hgo...@gmail.com> wrote:
Hi All,
Thanks for  taking the time to respond to my question.
Cal: I did try uninstalling and re-installing.
Kejun: Yes, it's installed.

May be you can try to remove the mysql and python-mysqldb, and then reinstall them.
and ensure the  new python-mysqldb and  the  mysql match.  

Good Luck.

damola oyeniyi

unread,
Aug 22, 2011, 11:27:06 AM8/22/11
to django...@googlegroups.com
click-a-tell?


From: damola oyeniyi <oyen...@yahoo.ca>
To: "django...@googlegroups.com" <django...@googlegroups.com>
Sent: Monday, August 22, 2011 4:03:48 PM
Subject: Django-SMS-GAteway


Is there documentation available on how to use the django-sms -gateway API? I am new to django entirely, even slightly new to web development, but I have a model that might not need webpages if I get my sms application right. At least I can to push a demo to my investors, before I take time to learn templating languages etc

hg

unread,
Aug 22, 2011, 1:56:44 PM8/22/11
to Django users
Hi,
Just to let everyone know - I uninstalled the mysql-python package for
the server (not just in my virtualenv) and re-installed it, and that
fixed the issue.
Thanks for your help!
Reply all
Reply to author
Forward
0 new messages