linux 执行django(python manage.py runserver),报错No module named _sqlite3,需要安装sqlite-devel,再重新编译安装python. 1.安装sqlite-devel yum install sqlite-devel 2.重新安装python tar -zxf Python-2.7.3.tgz cd Python-2.7.3 ./configure make && make install 然后就可以了.
会出现这样的错:CommandError: App 'books' has migrations. Only the sqlmigrate and sqlflush commands can be used when an app has migrations. 这是因为旧版本和新的版本命令已经不一样 的问题. 我用的是django =1.8.3, 写好自己的model以后可以换成这样的命令来生成数据库表: python manage.py makemigrations books 然后:pyt