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
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:
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 !!!
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.