Issues with ChromaDB vector store when deploying to Streamlit due to pysql3 version in deployment environment

0

I’m deploying an app in Streamlit which uses ChromaDB as vector store. The app works perfectly fine locally, but on deployment environment it throws this error:

RuntimeError: [91mYour system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0.

I found some old threads where people have asked the same question and applied the solution suggested in those threads:

  • added pysqlite-binary==0.5.1.3380300 and pysqlite3==0.5.2 into requirements.txt (version might differ for others)
  • insert the following on top of the app:import(“pysqlite3”)
    import sys sys.modules[‘sqlite3’] = sys.modules.pop(‘pysqlite3’)import sqlite3

I deleted the app and redeployed with the updated requirements.txt file and importing the pymysql3 at the start of the streamlit app. This time, the app will not even deployed as there are issues with instalment of packages already.

Error message:

ERROR: Failed building wheel for pysqlite3 Running setup.py clean for pysqlite3 Building wheel for pypika (pyproject.toml): started
Building wheel for pypika (pyproject.toml): finished with status ‘done’ Created wheel for pypika: filename=PyPika-0.48.9-py2.py3-none-any.whl size=53724 sha256=61a741c62f31f6c5586397250cbd09d4d4899b7b7e25242193ade312cc21a333 Stored in directory: /tmp/pip-ephem-wheel-cache-xlw45g8_/wheels/a3/01/bd/4c40ceb9d5354160cb186dcc153360f4ab7eb23e2b24daf96d Successfully built docx2txt pypika Failed to build pysqlite3

The solution seem to have worked for many people but it will not work on mine.

Just wondering if anyone has any solution that works for them?

Many thanks in advance

I am also having this same error. I have tried removing pysqlite3 from my requirements file.

My previous response was wrong. This is what you should do:

  1. Get your system back to the state where you were having the "Your system has an unsupported version of sqlite3" error.
  2. Visit the link suggested in the error message.
  3. Follow the advice in the “If you are on a Linux system” bullet.

@Goyo I have tried everything but this error persist maybe something wrong with chromadb.

Maybe something is wrong with chromadb, your code or your requirements file. Since chromadb is written and maintained by professional developers and used by several thousand people, I would consider your code and your requirements file as the main suspects. Of course I couldn’t tell for sure.