且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

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

更新时间:2021-08-20 22:27:09

使用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