As we know – sqlite3 is typically part of python’s standard library
We did a comparison for sqlite3 version found b/w Azure App Service and Local Windows Machine, while both having same Python 3.11 version
Created an Azure App Service with below options:
OS: Linux
Runtime: Python 3.11 (3.11.4)
App Service Plan: Free
Region: East US
Published this code snippet wrapped inside a web app on App Service
:
import sqlite3
print(sqlite3.sqlite_version)
We executed the same code in local windows machine (Python 3.11) as well.
The results are as follows:
Sqlite3
version onAzure App Service
is:3.34.1
which is pretty old, Follow this linkSqlite3
version onlocal windows machine
is:3.39.4
which is still recent, if not the latest
Because of this version gap
, certain library such as chromadb
which needs sqlite3 >= 3.35.0
fails to create index on Azure App Service
.
Could someone explain this gap in sqlite3
version b/w Azure App Service
vs Local Windows
(using open-source python distribution), despite both having same Python 3.11
version, and how could we upgrade sqlite3
version on App Service
Thanks in advance.
2
Answers
I've resolved this issue. The steps are listed at the following link:
https://learn.microsoft.com/en-us/answers/questions/1369017/azure-app-service-has-older-sqlite3-version-3-34-1
Yes, Azure App service used Sqllite version – 3.34.1 when I deployed a sample streamlit app with SQLlite in Azure app service according to the comment by James, Refer below:-
According to my SO thread answer here in order for chromadb package to work, You need to Create your Azure Web app with Python 3.8 like below:-