Your system has an unsupported version of sqlite3.
Hey, I was trying to create a simple crew ai + fastapi application, and I ran into this issue.
RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0.
Versions: [tool.poetry.dependencies] python = ">=3.10,<3.13" uvicorn = "^0.30.3" crewai = "^0.41.1" fastapi = "^0.111.1"
Hi @KGKallasmaa What OS are you using?
Are you running your crew in a clean Virtual env?
@KGKallasmaa
Had a same issue when running other app on public cloud. This issue is due to your os system setup and/or python version, and chromadb requirements.
You can try following:
- add/ install: pysqlite3-binary ~= 0.5.2 to your requirements 2 . add to the top of the main file: import sqlite3 import pysqlite3 import sys sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
this should hot swap incompatible version of sqlite3
if it doesn't work, try upgrading your python version. (with steps above)
On a public cloud which I have used or embedchain app it started to work with python 3.12
Let me know if you have succeeded.
I am experiencing this on the streamlit.io deployment of my CrewAI (v0.36.1) app since they install http://deb.debian.org/debian bullseye/main amd64 sqlite3 amd64 3.34.1-3. I am running Python 3.12... and it doesn't seem to matter what version of Python I choose in the cloud configuration.
I am running Python 3.12.4 for local development. Everything works in development. My local sqlite3 version is 3.43.2 though.
[tool.poetry.dependencies] python = ">=3.10,<=3.13" crewai = "^0.36.1" streamlit = "^1.35.0" python-dotenv = "^1.0.1" docx2txt = "^0.8" exa-py = "^1.0.12" crewai-tools = "^0.4.0" langchain-openai = "^0.1.7" python-docx = "^1.1.2" markdown2 = "^2.4.13" pypandoc = "^1.13" markdown2docx = "^0.1.0" pydantic = "^2.8.2"
- I wasn't able to install pysqlite3-binary (0.5.3.post1). It would just fail.
(.venv) (.venv) % poetry add pysqlite3-binary Using version ^0.5.3.post1 for pysqlite3-binary
Updating dependencies Resolving dependencies... (7.6s)
Package operations: 1 install, 0 updates, 0 removals
- Installing pysqlite3-binary (0.5.3.post1): Failed
RuntimeError
Unable to find installation candidates for pysqlite3-binary (0.5.3.post1)
at .venv/lib/python3.12/site-packages/poetry/installation/chooser.py:74 in choose_for 70│ 71│ links.append(link) 72│ 73│ if not links: → 74│ raise RuntimeError(f"Unable to find installation candidates for {package}") 75│ 76│ # Get the best link 77│ chosen = max(links, key=lambda link: self._sort_key(package, link)) 78│
Cannot install pysqlite3-binary.
- My assumption is that you only want to install the binary if running an older [than 3.12] Python.
- I started to try and pin to chromadb 0.3.29 and downgrade libraries but that got messy fast.
- I was able to spin up chroma in a docker container and use it directly, but I don't know how to update crewai to use a remote chromadb.
Regression Issue: CrewAI 0.74.0 Fails to Recognize Supported SQLite Version
Description:
I've encountered this very same regression issue where CrewAI 0.70.1 works successfully when creating a new crew, but CrewAI 0.74.0 fails to recognize the supported version of SQLite.
Reproduction Steps:
- Create a new project with a
requirements.txtfile containing:
crewai==0.70.1
crewai-tools
- Run
pip install -r requirements.txtand thencrewai create crew exampleproject1. This works successfully. - Update the
requirements.txtfile to:
crewai==0.74.0
crewai-tools
- Run
pip install -r requirements.txtand thencrewai create crew exampleproject2. This fails with the error message:
RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0.
Environment:
- Running on a brand new project on a new repository on a GitHub codespace
- Python 3.12.1
Additional Information:
- Running
sqlite3 --versionreturns3.45.3 2024-04-15 13:34:05 8653b758870e6ef0c98d46b3ace27849054af85da891eb121e9aaa537f1e8355 (64-bit), which meets the required version.
I'm picking up my interest in this project after a few months away and so I will stick with v0.70.1 for now since this is working...
A bit of an update from me… After looking into this for quite a while, I can now confirm that CrewAI code is actually fine, it's all to do with the users set up.
First thing I confirm everything is working correctly on version crewai==0.74.2 and crewai-tools==0.13.2. On my set up, I was trying to use GitHub code spaces. It turns out the universal image uses Ubuntu LTS 20 with a very old version of sqlite3. When Python is installed, it looks for the locally installed version of sqlite3 and uses that. Therefore, if one has an old version of sqlite3, updating Python makes no difference. Abandoning the GitHub Codespaces universal image for python:1-3.12-bullseye this also comes with an old version of sqlite3 - making it non viable to run with CrewAI.
In the end, to get it working, I pulled the latest (pinned) ubuntu image mcr.microsoft.com/vscode/devcontainers/base:ubuntu-24.04 then installed python3 after. This comes with a much higher version of sqlite3 and resolves the issue, then CrewAI quickstart works well.
got same sqlite error running crewai create crew my_project on Ubuntu, in fresh venv, with pip install crewai but pip install crewai==0.74.0 works fine
Same issue faced with Azure App Service deployments with the latest version of crewai Dear @joaomdmoura - we are also facing this issue and are unable to apply the workaround as well . As a result stuck with the earlier version of crewai which does not have have the chromadb dependency.
A bit of an update from me… After looking into this for quite a while, I can now confirm that CrewAI code is actually fine, it's all to do with the users set up.
First thing I confirm everything is working correctly on version
crewai==0.74.2andcrewai-tools==0.13.2. On my set up, I was trying to use GitHub code spaces. It turns out the universal image uses Ubuntu LTS 20 with a very old version of sqlite3. When Python is installed, it looks for the locally installed version of sqlite3 and uses that. Therefore, if one has an old version of sqlite3, updating Python makes no difference. Abandoning the GitHub Codespaces universal image forpython:1-3.12-bullseyethis also comes with an old version of sqlite3 - making it non viable to run with CrewAI.In the end, to get it working, I pulled the latest (pinned) ubuntu image
mcr.microsoft.com/vscode/devcontainers/base:ubuntu-24.04then installed python3 after. This comes with a much higher version of sqlite3 and resolves the issue, then CrewAI quickstart works well.
can you provide your devcontainer.json file? I am having issues with having python and pip installed
Sure. Here you go (ignore / remove out the customizations if you like):
{
"name": "CrewAI Example",
"image": "mcr.microsoft.com/vscode/devcontainers/base:ubuntu-24.04",
"customizations": {
"vscode": {
"extensions": [
"GitHub.copilot-chat",
"GitHub.copilot"
]
}
},
"features": {
"ghcr.io/devcontainers/features/python:1": {}
}
}
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.
related https://github.com/crewAIInc/crewAI/issues/1841