Fix ChromaDB startup error: Your system has an unsupported version of sqlite3.

Problem:

After installing chromadb, when we try to start it using the command

 chroma run --host localhost --port 8000 --path /home/user/chromadata

Its give this error:

Traceback (most recent call last):
  File "/home/dheeyantra/.local/bin/chroma", line 5, in <module>
    from chromadb.cli.cli import app
  File "/home/dheeyantra/.local/lib/python3.8/site-packages/chromadb/__init__.py", line 79, in <module>
    raise RuntimeError(
RuntimeError: Your system has an unsupported version of sqlite3. Chroma                     requires sqlite3 >= 3.35.0.
Please visit                     https://docs.trychroma.com/troubleshooting#sqlite to learn how                     to upgrade.

Fix:

pip install pysqlite3-binary
vi ~/.local/lib/python3.8/site-packages/chromadb/__init__.py

#add these lines to the TOP OF THE FILE and save it.
__import__('pysqlite3')
import sys
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')

Start the chromadb. Should work now.

Kj
Kj [/.] Sreekumar programs computers as a hobby and profession. Into programming from his school days, Sree uses Codemarvels to key in facts and fixes he finds interesting while working on different projects. Some of the articles here give away a few shades of his philosophical leanings too.

Leave a Comment

Your email address will not be published. Required fields are marked *