django can't find new sqlite version? (SQLite 3.8.3 or later is required (found 3.7.17))

后端 未结 9 1477
既然无缘
既然无缘 2020-12-08 10:18

I\'ve cloned a django project to a Centos 7 vps and I\'m trying to run it now, but I get this error when trying to migrate:

$ python manage.py m         


        
9条回答
  •  一整个雨季
    2020-12-08 10:52

    To check which version of SQLite Python is using:

    $ python
    Python 3.7.3 (default, Apr 12 2019, 16:23:13) 
    >>> import sqlite3
    >>> sqlite3.sqlite_version
    '3.27.2'
    

    For me the new version of sqlite3 is in /usr/local/bin so I had to recompile Python, telling it to look there:

    sudo LD_RUN_PATH=/usr/local/lib ./configure --enable-optimizations
    sudo LD_RUN_PATH=/usr/local/lib make altinstall
    

    I hope that helps.

提交回复
热议问题