Tarek Kalaji
Tarek Kalaji

Reputation: 2257

Getting “Error loading MySQLdb module: No module named MySQLdb” in django-cms

I can't connect with mysql and I can't do "python manage.py syncdb" on it

how to connect with mysql in django and django-cms without any error?

Upvotes: 1

Views: 9265

Answers (2)

Tarek Kalaji
Tarek Kalaji

Reputation: 2257

to connect to mysql with django

sudo apt-get install git          # to install git

sudo apt-get install python-pip   # to install pip

sudo pip install Django           # to install Django to your system

After that you should go to project path and then execute the following command, the same path of 'manage.py' file

pip install mysql-python

Finally you may synchronous your database without problem

python manage.py syncdb

Upvotes: 5

SAF
SAF

Reputation: 317

This is an error message you get if MySQLdb isn't installed on your computer.

The easiest way to install it would be by entering pip install MySQL-python into your command line.

Upvotes: 3

Related Questions