Nginx+uwsgi+Django搭建的時候遇到的問題
阿新 • • 發佈:2019-01-31
在用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