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

痴心易碎 提交于 2019-12-03 21:43:39

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!