ubuntu 14.04 升級django2.2 問題筆記

1.sqlite3版本問題sql

packages/django/db/backends/sqlite3/base.py", line 63, in check_sqlite_version
    raise ImproperlyConfigured('SQLite 3.8.3 or later is required (found %s).' % Database.sqlite_version)
django.core.exceptions.ImproperlyConfigured: SQLite 3.8.3 or later is required

解決方案:django

#更新SQLite 3
#獲取源代碼(在主目錄中運行)
$ cd
$ wget https://www.sqlite.org/2019/sqlite-autoconf-3270100.tar.gz
$ tar xvfz sqlite-autoconf-3270100.tar.gz

#構建並安裝
$ cd sqlite-autoconf-3270100
$ ./configure --prefix = / usr / local
$ make
$ sudo make install
$ sudo find / usr / -name sqlite3

#沒必要要的文件,目錄刪除
$ cd
$ rm sqlite-autoconf-3270100.tar.gz
$ rm -rf ./sqlite-autoconf-3270100

#檢查版本
$ / usr / local / bin / sqlite3 --version

3.27.1 2019-02-08 13:17:39 0eca3dd3d38b31c92b49ca2d311128b74584714d9e7de895b1a6286ef959a1dd

$ 創建軟鏈接
sudo ln -s / usr / local / bin / sqlite3 / usr / bin / sqlite3ui

最後:執行命令 ldconfig 3d

 

2. uwsgi 啓動時報錯   確認虛擬環境已經安裝django2.2,仍是出現如下錯誤,sqlite

importerror no module named django core wsgiget

解決方案:執行命令 ldconfig it

相關文章
相關標籤/搜索