-
-
Save defulmere/8b9695e415a44271061cc8e272f3c300 to your computer and use it in GitHub Desktop.
# ⚠️ USE AT YOUR OWN RISK | |
# first: pip install pysqlite3-binary | |
# then in settings.py: | |
# these three lines swap the stdlib sqlite3 lib with the pysqlite3 package | |
__import__('pysqlite3') | |
import sys | |
sys.modules['sqlite3'] = sys.modules.pop('pysqlite3') | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.sqlite3', | |
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), | |
} | |
} |
I tried this couple of months ago and worked, however now it doesn't.
the issue is that I'm not even able to install the dependency:
pip install pysqlite3-binary
ERROR: Could not find a version that satisfies the requirement pysqlite3-binary (from versions: none)
ERROR: No matching distribution found for pysqlite3-binary
I saw the packages are still with the same name on pypi and they were not removed, but not sure what changed and does not work now.
Any ideas?
Bump, I'm having the same issue as @cmosta0 . Any workaround?
Bump, I'm having the same issue as @cmosta0 . Any workaround?
Hi. In my case, the issue seems to be related the OS. Actually to be able to install using pip, I needed to use --platform
on pip install
command, otherwise every attempt just returned the same error mentioned above. (I'm using macbook-pro M2)
@cmosta0 Hey what is the pip install command you used to successfully install the binary? Thanks in advance
thinks , u solve my problem, very thinks
@defulmere Thank you very much. This worked for me as well.
This was helpful, worked for me as well !
I was getting following error while trying to run chromadb example code using my python3.10.8 venv3.10:
File "~/venv3.10/lib/python3.10/site-packages/chromadb/__init__.py", line 36, in <module> raise RuntimeError( RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0.
I executed following steps to resolve this error:
- Inside my python3.10.8's virtual environment i.e. venv3.10, installed pysqlite3-binary using command:
pip install pysqlite3-binary
- Added these 3 lines in
venv3.10/lib/python3.10/site-packages/chromadb/__init__.py
at the beginning:__import__('pysqlite3') import sys sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
worked like magic! Thank you!
I tried this couple of months ago and worked, however now it doesn't. the issue is that I'm not even able to install the dependency:
pip install pysqlite3-binary ERROR: Could not find a version that satisfies the requirement pysqlite3-binary (from versions: none) ERROR: No matching distribution found for pysqlite3-binary
I saw the packages are still with the same name on pypi and they were not removed, but not sure what changed and does not work now.
Any ideas?
It also happened to me, until I realized it only works on Linux.
What do we have to do, if we are deploying on streamlit?
I found that on your local, just delete your virtual environment, recreate it with python 3.10, run pip install -r requirements.txt
and you'll be good.
I tried this couple of months ago and worked, however now it doesn't. the issue is that I'm not even able to install the dependency:
pip install pysqlite3-binary ERROR: Could not find a version that satisfies the requirement pysqlite3-binary (from versions: none) ERROR: No matching distribution found for pysqlite3-binary
I saw the packages are still with the same name on pypi and they were not removed, but not sure what changed and does not work now.
Any ideas?It also happened to me, until I realized it only works on Linux.
Persistent Issue: Unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0
What is the solution if we are deploying streamlit App.
Our Streamlit App is working fine on local but after Deployment on Streamlit Cloud the issue occurred
Hey, so I was able to bypass this issue by just adding pysqlite3-binary
to requirements.txt
Did not have to add any versioning, or other code.
This was helpful, worked for me as well !
I was getting following error while trying to run chromadb example code using my python3.10.8 venv3.10:
File "~/venv3.10/lib/python3.10/site-packages/chromadb/__init__.py", line 36, in <module> raise RuntimeError( RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0.
I executed following steps to resolve this error:
- Inside my python3.10.8's virtual environment i.e. venv3.10, installed pysqlite3-binary using command:
pip install pysqlite3-binary
- Added these 3 lines in
venv3.10/lib/python3.10/site-packages/chromadb/__init__.py
at the beginning:__import__('pysqlite3') import sys sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
And my code worked like a charm!
Thank you so much, this worked
How to manage updating ~/venv3.10/lib/python3.10/site-packages/chromadb/__init__.py
in server running with docker?
这很有帮助,对我也很有用!
当我尝试使用我的 python3.10.8 venv3.10 运行 chromadb 示例代码时出现以下错误:
File "~/venv3.10/lib/python3.10/site-packages/chromadb/__init__.py", line 36, in <module> raise RuntimeError( RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0.
我执行了以下步骤来解决此错误:
- 在我的 python3.10.8 的虚拟环境即 venv3.10 中,使用命令安装了 pysqlite3-binary:
pip install pysqlite3-binary
venv3.10/lib/python3.10/site-packages/chromadb/__init__.py
在开头添加了以下3行:__import__('pysqlite3') import sys sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')
我的代码运行得非常好!
very good ! 3Q
Recently I moved from Windows to Mac. In both the systems I was running code in devontainers. Not sure why, but I am getting following error in devcontainer on mac. Any idea?
ERROR: Could not find a version that satisfies the requirement pysqlite3-binary (from versions: none) ERROR: No matching distribution found for pysqlite3-binary
Hi guys I working locally on Windows and using AppFunction based on Linux and I want to using this option only when OS is Linux I've tried something like this
`if platform.system() == "Linux":
import("pysqlite3")
import sys
sys.modules["sqlite3"] = sys.modules.pop("pysqlite3")
logging.info("pysqlite3 imported and changing sqlite3.")
import sqlite3 # noqa: E402
logging.info("Using version sqlite3 %s", sqlite3.sqlite_version)`
for linux I installing pysqlite3-binary with other lib using requirements.txt during uploading a pipeline I don't have any errors but It's seems like pysqlite3-binary didn't overwrite.
Do you have any sugestions?
Hello all. I am using an Azure web app. Azure won't update its sqlite version on their web app containers, so I am trying to do that during build and deployment. I do not have access to the init.py file in chroma. I am not sure how to create the google/colab folder during my build/deployment process. Any pointers here would be much appreciated!
I found a solution, and another issue:
If you are using Azure Web Apps, as part of the build process, in the stage "Install Application Dependencies", add the following:
python -m pip install pysqlite3-binary
python -m pip install chromadb
cd antenv
cd lib
cd python3.11
cd site-packages
cd google
mkdir colab
Now the new problem is, I can't write to the Web App file system! Whenever I try to initialize ChromaDB it fails, even for the /tmp dir.
@tyler-suard-parker, thanks to your solution, I've got it working with an Azure Web App. To fix the writing to the file system, I added the mkdir line to an already existing startup.sh file (since my web app uses Quart and hypercorn instead of gunicorn)
mkdir -p antenv/lib/python3.11/site-packages/google/colab
python -m hypercorn --bind=0.0.0.0 app:app;
(If you're using gunicorn it'd look something like
mkdir -p antenv/lib/python3.11/site-packages/google/colab
gunicorn --bind=0.0.0.0 --timeout 600 app:app
)
Then point your app's startup command to the file, in Settings > Configuration > Startup Command = ./startup.sh
You do not need to modify anything. To bypass the Colab check, you can create an empty folder
google/colab
in the site packages folder. That way on the Chroma__init__.py
when it tries to do theimport google.colab
check it will pass, and thus replace sqlite3 with pysqlite3
This worked for me!!
You do not need to modify anything. To bypass the Colab check, you can create an empty folder
google/colab
in the site packages folder. That way on the Chroma__init__.py
when it tries to do theimport google.colab
check it will pass, and thus replace sqlite3 with pysqlite3This worked for me!!
worked for me too
What do we have to do, if we are deploying on streamlit?
Hey did you solve this issue ?
Hey, so I was able to bypass this issue by just adding
pysqlite3-binary
torequirements.txt
Did not have to add any versioning, or other code.
Hey, were you deploy on the cloud, I wanted to deploy on streamlit, but error persist even after adding it to the requirement file
same problem here in streamlit community cloud
raise RuntimeError(
RuntimeError: Your system has an unsupported version of sqlite3. Chroma requires sqlite3 >= 3.35.0.
how to solve this issue?
It seems like they know the issue. It just matters on them upgrading the Debian OS from bullseye
to bookworm
https://discuss.streamlit.io/t/debian-11-eol/80690/7
This seemed to work for me:
-
Download the Latest SQLite Source:
wget https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz -
Extract the Downloaded File:
tar -xvf sqlite-autoconf-3430100.tar.gz
cd sqlite-autoconf-3430100 -
Build and Install SQLite:
./configure
make
sudo make install -
Verify the Installation:
After installation, confirm that the new version is available:
sqlite3 --version -
Verify in Python:
Ensure that Python picks up the updated SQLite version:
python -c "import sqlite3; print(sqlite3.sqlite_version)"
thanks, worked for me.
This did not solve the error for me.