1

I have installed both python 3.9 and sqlite 3.33.0 by compiling from source code.

As shown below:

sqlite3

$ sqlite3 --version

3.33.0 2020-08-14 13:23:32...

Python

$ python3 --version

Python 3.9.0

However, when I check in python it showed:

>>> import sqlite3
>>> sqlite3.sqlite_version 
'3.7.17

After some reading, i have tried

$ which sqlite3
/usr/local/bin/sqlite3

export LD_LIBRARY_PATH=/usr/local/bin

But this still have not resolved to the issue.

How do I get Python to use my own installation of sqlite?

Any help will be appreciated!

Update

I was able to get python3.9 to use my own installation of sqlite3 by recompiling python with this answer

olafy
  • 13
  • 4
  • have you seen my answer? Do update the status of the problem. – AzyCrw4282 Oct 23 '20 at 12:57
  • I was able to resolve the issue by recompiling python3.9 with this guide https://stackoverflow.com/questions/55674176/django-cant-find-new-sqlite-version-sqlite-3-8-3-or-later-is-required-found I need this specific sqlite3 version to use with my django application. – olafy Oct 23 '20 at 18:28

1 Answers1

0

As you've may already figured out, each version of Python comes with the latest SQLite included so often you are not required to install it manually. Unless this is for a specific use-case, I would highly discourage the use of using your own one.

To solve your current problem (which has been asked many times before), see the answer here - Python sqlite3: run different sqlite3 version.

You can also set up a customer interpreter for this case, see this for instructions.

AzyCrw4282
  • 7,222
  • 5
  • 19
  • 35
  • 1
    I set the LD_RUN_PATH during recompiling python to my own sqlite installation and it worked! tahnk you for your help! – olafy Oct 23 '20 at 18:33