Django: Upgrading sqlite3 database on MacOS, Python still showing the older version even after upgrading

Viewed 73

I had sqlite3 version 3.23.1 installed. and the sqlite binary file path is:

/anaconda3/bin/sqlite3

then I downloaded the sqlite3 zip file from https://sqlite.org/download.html (version 3.35.4). Then followed the following commands to upgrade my sqlite3 database:

which sqlite3

sudo mv /anaconda3/bin/sqlite3 /anaconda3/bin/sqlite3-old

sudo chmod -x /anaconda3/bin/sqlite3-old

mv /downloads/sqlite3-downloaded-directory/sqlite3 /anaconda3/bin/

sudo chmod +x /anaconda3/bin/sqlite3

Then I checked the version:

sqlite3 --version

and it showed the upgraded version

3.35.4

But then I went into my Atom editor where I am writing my Django application and entered into the python shell using:

python manage.py shell

and then checked the version from here using the following commands:

>> import sqlite3
>> print(sqlite3.sqlite_version)

but it is still showing the older version i.e 3.23.1

Does anyone has an idea how to resolve this issue.

1 Answers

For some future readers:

As I am using Anaconda package manager to I used the following way to upgrade the sqlite3 database in python:

conda install -c anaconda sqlite

And then in the python shell check the sqlite version:

>> import sqlite3
>> print(sqlite3.sqlite_version)
Related