SQLite3 is too old

If you’re creating a debugging post, please include the following info:

  1. Share the link to the public app (deployed on Community Cloud).
  1. Share the link to your app’s public GitHub repository (including a requirements file).
  1. Share the full text of the error message (not a screenshot).
RuntimeError: e[91mYour system has an unsupported version of sqlite3. Chroma    



requires sqlite3 >= 3.35.0.e[0m
e[94mPlease visit                     

https://docs.trychroma.com/troubleshooting#sqlite to learn how                  

to upgrade.e[0m
  1. Share the Streamlit and Python versions.
  • streamlit 1.27.2
  • python 3.10

I am facing a deploy issue when using chromadb…

tried using pysqlit3-binary and the steps showed on the last issue that this was appointed: The sqlite3 version (3.34.1) on streamlit cloud is too old. Could you upgrade it? - :cloud: Community Cloud - Streamlit

but it didnt worked, and i dont know what to do.

1 Like

Same issue

Same here, replied to another thread as it seems some of us are experiencing the same error, and no solution or clarification provided anywhere.

Things that finally worked for me after spending 2 nights on it:

Step 1: Modify your requirements.txt file by adding pysqlite3-binary. This adjustment ensures your application operates with the necessary version. Just include this line in your requirements.txt:

pysqlite3-binary

Step 2 (Optional): if you are using sqlite3 directly somewhere then update your code. Replace:

import sqlite3

with:

import pysqlite3 as sqlite3

Step 3: If the error is being caused due to a dependency of any class on sqlite3 then make sure to add the below lines above the lines causing error. As a matter of fact, it is simply better to add it at the top of the python file where there error is being caused:

__import__('pysqlite3')
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')

Step 4: Delete the current app and redeploy it. Also, while deploying it go to
Advance Seetings>Python Version to 3.11.

Hope it solves this issue. Enjoy your app streamlit cloud.

Fun Fact: I tackled this error while trying to deploy my Ai Writing Agent Crew on streamlit and hence it is super satisfying to generate this comment with my writing agent crew running on streamlit cloud. Cheers to all the dev out there !!!

1 Like

Thanks, this is a working solution. However I wonder why we have to do this - langchain_chroma has some similar logic already although I’m not sure what triggers it. This issue makes working with langchain on streamlit somewhat painful, I certainly don’t want to be using be using this workaround frequently.