-
-
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'), | |
| } | |
| } |
thanks for the solution
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__.pyat the beginning:__import__('pysqlite3') import sys sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')worked like magic! Thank you!
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__.pyat the beginning:__import__('pysqlite3') import sys sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')And my code worked like a charm!
this worked for me as well i was using python 3.12
Hi, I tried the solutions above, I have
pysqlite3-binaryin requirements.txt. I have added the following to the streamlit_app.py code. I am on Python version 3.10.15. I have sqlite 3.43.2 available on my mac.__import__('pysqlite3') import sys sys.modules['sqlite3'] = sys.modules.pop('pysqlite3')But the following gives me the error of "No module named 'pysqlite3'"
Running
pip install pysqlite3is unsuccessful, giving the error "ERROR: Failed to build installable wheels for some pyproject.toml based projects (pysqlite3)"Can someone help. I face the issue when trying to deploy the app on streamlit. It worked perfectly for me on the local.