aditya_gaur
aditya_gaur

Reputation: 3295

Unable to install MySQL_python on OSX

I am trying to use django with mysql. So in settings.py I gave the engine :

'ENGINE': 'django.db.backends.mysql', 

But when I try to run python manage.py syncdb I get the following error:

django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

From here I got the solution for it, i.e. to install MySQL_python. But when I try to install mysql_python I get the following error:

error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

All the solutions that I found suggest to install the new version of xCode. Is there a way to get rid of the error without installing xCode.

Upvotes: 0

Views: 66

Answers (1)

Amber
Amber

Reputation: 526583

No. You need to install XCode to have gcc available in OS X, which is a requirement for compiling Python modules written in C.

Upvotes: 1

Related Questions