I'm planning to host my site at pythonanywhere and they provided with a python version of 3.9.5 while sqlite version is 3.31.1.
I wanted to match what was provided from pythonanywhere in my pc for developing purposes, so I tried to use pyenv which I install through brew because my system(ubutu 22.04) is using python 3.10.4 and sqlite 3.37.2 version. After I execute pyenv install 3.9.5
, then I check the sqlite3 through this:
$ python
Python 3.9.5 (default, Aug 25 2022, 16:07:57)
[GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> sqlite3.sqlite_version
'3.37.2'
The sqlite3 version is still '3.37.2', so how do I make pyenv build a python with a different sqlite version or make the installed python to use a different sqlite version?
I still beginner, but I willing to learn so if anyone can provide a thorough instructions it will much appreciated.
Edit:
I probably can't use pysqlite3
since I the code for my site is already written and if I use pysqlite3
, I need to change it from import sqlite3
to import pysqlite3 as sqlite3
. I would like to avoid that.