The sqlite3 version (3.34.1) on streamlit cloud is too old. Could you upgrade it?

Summary

The sqlite3 version on streamlit cloud is 3.34.1. Even after I selected the latest Python 11 to create my app on streamlit cloud. I can’t use Chroma due to this old version of sqlite3. Chroma requires sqlite3 verion > 3.35.

Could you upgrade sqlite3 on streamlit cloud?

Steps to reproduce

I use sqlite3.sqlite_version to get the sqlite3 version on streamlit cloud.

Hi @Karl_Tang

You can adjust library dependencies and version numbers as detailed in the following Doc:

Best regards,
Chanin

Hi @dataprofessor,

Sqlite3 is module from base python. Per description in the document: Only include packages in your requirements file that are not distributed with a standard Python installation. If any of the modules from base Python are included in the requirements file, you will get an error when you try to deploy.

I tried to add a line sqlite3>=3.36 to the requirements.txt. I got deployment error as document described.

It’s weird that I tried python 9, 10, 11 to create app on streamlit cloud. The sqlite3 version is always 3.34.1, no matter which python version I selected. It’s abnormal.

Do you have further suggestion? Thanks.

Here is the solution to address this problem.

  1. Add pysqlite3-binary to your requirements.txt
  2. Add below lines to the top of your python file.

import(‘pysqlite3’)
import sys
sys.modules[‘sqlite3’] = sys.modules.pop(‘pysqlite3’)

1 Like

Glad you’ve found the solution and thanks for sharing :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.