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

2
  • have you seen my answer? Do update the status of the problem. Commented Oct 23, 2020 at 12:57
  • I was able to resolve the issue by recompiling python3.9 with this guide stackoverflow.com/questions/55674176/… I need this specific sqlite3 version to use with my django application. Commented Oct 23, 2020 at 18:28

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

I set the LD_RUN_PATH during recompiling python to my own sqlite installation and it worked! tahnk you for your help!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.