https://prefect.io logo
Title
h

Hedgar

08/27/2022, 7:41 AM
My current challenge: my system’s Sqlite3 version is the latest, 3.39, but the Sqlite3 version in the python terminal is 3.19. , Perfect 2 looks for Sqlite3 from Python! How can I upgrade Python’s sqlite3 version?
a

Anna Geller

08/27/2022, 11:02 AM
Hi Hedgar, could you try in a Conda virtual environment? This comes prepackaged with the right SQLite version
h

Hedgar

08/27/2022, 6:00 PM
I'm afraid that didn't work either. However upon further research I discovered that using the module
pyenv
to determine a global version of Python actually locks other dependencies to their version prior to when
pyenv
was initially used. To solve this challenge I had to fall back on
pyenv
to reconfigure my python and all its packages especially Sqlit3 which was already updated via brew. I ran the below code, giving
pyenv
my current version of 3.10.4, yours could be different.
LDFLAGS="-L/usr/local/opt/sqlite/lib -L/usr/local/opt/zlib/lib" CPPFLAGS="-I/usr/local/opt/sqlite/include -I/usr/local/opt/zlib/include" pyenv install -v 3.10.4
Watch the magic!! ☝️Dont forget to change to your desired python version like I said mine is
3.10.4
See this issues for better understanding: https://github.com/pyenv/pyenv/issues/333
1
:thank-you: 3
a

Anna Geller

08/27/2022, 6:43 PM
thanks for sharing your solution