Hi.

I think Python has built in version so you might need to build custom
version of python.

Pyenv is pretty neat tool to handle custom python builds.

ke 17. heinäk. 2019 klo 21.36 Tal <tal.z...@gmail.com> kirjoitti:

> Or is Python's sqlite built into Python, not depending on /usr/bin/sqlite3
> at all?
> Would I have to recompile Python for a newer version of sqlite that django
> can use?
>
> PS. I know I can downgrade django. I'm wondering how complex it is to
> compile a new version of sqlite for it to use.
>
> On Wednesday, July 17, 2019 at 12:14:54 PM UTC-6, Tal wrote:
>>
>> When using the latest django from PyPI in CentOS 7, running "./manage.py
>> runserver" gives an error about sqlite being too old.
>> Since there's no newer sqlite version in the CentOS repos, I tried
>> building sqlite from scratch:
>>
>> curl -L https://www.sqlite.org/2019/sqlite-amalgamation-3290000.tar.gz >
>> sqlite-amalgamation-3290000.tar.gz
>> tar -xvf sqlite-amalgamation-3290000.tar.gzcd sqlite-autoconf-3290000
>> ./configure
>> make
>> make install
>>
>>
>> This sets up the latest sqlite3 to /usr/local/bin/.
>> Since /usr/local/bin is ahead of /usr/bin in my PATH, just running
>> "sqlite3" in the terminal runs the latest sqlite.
>> It runs without issues, and shows that it's the latest version:
>>
>> my_hostname# sqlite3
>>
>> SQLite version 3.29.0 2019-07-10 17:32:03
>> Enter ".help" for usage hints.
>> Connected to a transient in-memory database.
>> Use ".open FILENAME" to reopen on a persistent database.
>> sqlite>
>>
>>
>> Running "./manage.py runserver" again, it still tries to use the old
>> version in /usr/bin, and fails.
>> My django is running in a pipenv virtual environment, where PATH still
>> has /usr/local/bin/ ahead of /usr/bin, and running "sqlite3" in terminal
>> still shows the latest version.
>>
>> I followed the traceback django gives me to the dbapi2.py module, where
>> to figure out the sqlite version it does this:
>>
>> import _sqlite3
>> _sqlite3.sqlite_version
>>
>>
>> If I run "python" in my virtualenv, and type those 2 lines, it shows the
>> old version of sqlite too.
>> _sqlite3 is not written in python - it's a compiled binary, so I can't
>> examine it to see where it looks.
>>
>> Am I missing something?
>> How can I tell _sqlite3 that there's a newer version of sqlite available
>> on the system?
>> Does _sqlite3 even care about /usr/local/bin/sqlite3? Or is there some
>> sqlite library it's looking for?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3d011ce9-c849-48a7-82be-0ea08edb4566%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/3d011ce9-c849-48a7-82be-0ea08edb4566%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91ofxska88xCDjXjhksE1goYSXJsBnMcehfr2jum3HLLewA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to