在django-cms中获取“加载MySQLdb模块时出错:没有名为MySQLdb的模块”

问题描述:

我无法连接到mysql,我无法做到这一点python manage.py syncdb

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

如何在django和django- cms没有任何错误?

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

使用django连接到mysql



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

之后,你应该去项目路径然后执行以下命令,同样的路径manage.py文件

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