Nginx+uwsgi+Django搭建的时候遇到的问题

来源:互联网 发布:windows 平板电脑吧 编辑:程序博客网 时间:2024/06/08 13:10

在用Nginx+uwsgi+Django架构搭建服务器的时候,安装完uwsgi,运行uwsgi --ini myweb_uwsgi.ini一直报下面的错误:

File "/usr/local/python27/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py", line 35, in <module>

    raise ImproperlyConfigured("Error loading either pysqlite2 or sqlite3 modules (tried in that order): %s" % exc)

django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3

在命令行下打开python解释器,import sqlite3正常,重新编译python之后,以上错误解决。如果没有sqlite3包的话,yum -y install sqlite-devel,然后重新编译python,以上问题解决。

./configure 

make && make install