crewAI
crewAI copied to clipboard
[BUG] Your system has an unsupported version of sqlite3. Chroma
Description
I am building a feature on streamlit which works perfectly locally - streamlit hub gives me
RuntimeError: [91mYour system has an unsupported version of sqlite3. Chroma
requires sqlite3 >= 3.35.0.[0m
my agent just using a sqlite3 locally but I can see the errors come from
File "/mount/src/sbo_retail/app/agentic_chatbot.py", line 8, in <module>
from crewai import Agent, Crew, Task
File "/home/adminuser/venv/lib/python3.12/site-packages/crewai/__init__.py", line 3, in <module>
from crewai.agent import Agent
File "/home/adminuser/venv/lib/python3.12/site-packages/crewai/agent.py", line 7, in <module>
from crewai.agents import CacheHandler
File "/home/adminuser/venv/lib/python3.12/site-packages/crewai/agents/__init__.py", line 2, in <module>
from .parser import CrewAgentParser
File "/home/adminuser/venv/lib/python3.12/site-packages/crewai/agents/parser.py", line 6, in <module>
from crewai.utilities import I18N
File "/home/adminuser/venv/lib/python3.12/site-packages/crewai/utilities/__init__.py", line 13, in <module>
from .embedding_configurator import EmbeddingConfigurator
File "/home/adminuser/venv/lib/python3.12/site-packages/crewai/utilities/embedding_configurator.py", line 4, in <module>
from chromadb import Documents, EmbeddingFunction, Embeddings
File "/home/adminuser/venv/lib/python3.12/site-packages/chromadb/__init__.py", line 94, in <module>
raise RuntimeError(
which I am not directly using any of the chroma
so I am not sure if this is a bug (unnecessarily loading those requirements leading to error on minimum enviornments like streamlit hub) or its a feature to request
Steps to Reproduce
make the most simple app and deploy it on stremlit - if it is really needed I can do it !
Expected behavior
no error and just lunch !
Screenshots/Code snippets
https://qzoycyf3p8cnc3ikrbhpjb.streamlit.app/
Operating System
Ubuntu 20.04
Python Version
3.12
crewAI Version
0.114.0
crewAI Tools Version
0.114.0
Virtual Environment
Venv
Evidence
https://qzoycyf3p8cnc3ikrbhpjb.streamlit.app/
Possible Solution
NA
Additional context
no additional context
@naarkhoom, can you try to install pysqlite-binary by running pip install pysqlite3-binary inside uv. I think there should be no dependency conflict with this
i did ( it downloaded pysqlite3-binary==0.5.4 ) and the problem unfortunately, still persist - it is on streamlit cloud hub
Could you please show the chromadb dependency version? Uv pip show chromadb
Hi @naarkhoo, the issue comes down to Ubuntu 20.04 not having a version of sqlite3 >= 3.35.0 which is required for ChromaDB.
They have raised a PR to import ChromaDB lazily, so if you're not using tools/functions that require ChromaDB you won't face issues if you upgrade to the latest version crewai==0.119.0
If you want to use an older version of CrewAI or you are using tools/functions that require ChromaDB on Ubuntu 20.04, you can install pysqlite3-binary and replace the sqlite package with it before making CrewAI Imports as such
__import__("pysqlite3")
import sys
sys.modules["sqlite3"] = sys.modules.pop("pysqlite3")
from crewai import Agent, Task, Crew
This is a workaround and will not fix issues like trying to run CrewAI CLI Commands
crewai create crew <crew_name>
A permanent fix is to upgrade to Ubuntu 22.04 or manually download and build a version of SQLite required by ChromaDB on Ubuntu 20.04
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.