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.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.