private-gpt
private-gpt copied to clipboard
ChromaDB with Python version 3.10.6
Hi all,
just tried to install privateGPT in a t3.small Ubuntu 22.04.2 x64.
The installation fails at this point:
/home/ubuntu/.local/bin/pip install chromadb==0.3.22 -v
giving the following output
Using pip 23.1.2 from /home/ubuntu/.local/lib/python3.10/site-packages/pip (python 3.10) Defaulting to user installation because normal site-packages is not writeable Collecting chromadb==0.3.22 Using cached chromadb-0.3.22-py3-none-any.whl (69 kB) Collecting pandas>=1.3 (from chromadb==0.3.22) Using cached pandas-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.3 MB) Collecting requests>=2.28 (from chromadb==0.3.22) Using cached requests-2.30.0-py3-none-any.whl (62 kB) Requirement already satisfied: pydantic>=1.9 in /home/ubuntu/.local/lib/python3.10/site-packages (from chromadb==0.3.22) (1.10.7) Collecting hnswlib>=0.7 (from chromadb==0.3.22) Using cached hnswlib-0.7.0.tar.gz (33 kB) Running command pip subprocess to install build dependencies Collecting setuptools>=42 Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB) Collecting wheel Using cached wheel-0.40.0-py3-none-any.whl (64 kB) Collecting numpy>=1.10.0 Using cached numpy-1.24.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB) Collecting pybind11>=2.0 Using cached pybind11-2.10.4-py3-none-any.whl (222 kB) Installing collected packages: wheel, setuptools, pybind11, numpy Successfully installed numpy-1.24.3 pybind11-2.10.4 setuptools-67.7.2 wheel-0.40.0 Installing build dependencies ... done Running command Getting requirements to build wheel running egg_info writing hnswlib.egg-info/PKG-INFO writing dependency_links to hnswlib.egg-info/dependency_links.txt writing requirements to hnswlib.egg-info/requires.txt writing top-level names to hnswlib.egg-info/top_level.txt reading manifest file 'hnswlib.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'hnswlib.egg-info/SOURCES.txt' Getting requirements to build wheel ... done Running command Preparing metadata (pyproject.toml) running dist_info creating /tmp/pip-modern-metadata-jkexsokp/hnswlib.egg-info writing /tmp/pip-modern-metadata-jkexsokp/hnswlib.egg-info/PKG-INFO writing dependency_links to /tmp/pip-modern-metadata-jkexsokp/hnswlib.egg-info/dependency_links.txt writing requirements to /tmp/pip-modern-metadata-jkexsokp/hnswlib.egg-info/requires.txt writing top-level names to /tmp/pip-modern-metadata-jkexsokp/hnswlib.egg-info/top_level.txt writing manifest file '/tmp/pip-modern-metadata-jkexsokp/hnswlib.egg-info/SOURCES.txt' reading manifest file '/tmp/pip-modern-metadata-jkexsokp/hnswlib.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file '/tmp/pip-modern-metadata-jkexsokp/hnswlib.egg-info/SOURCES.txt' creating '/tmp/pip-modern-metadata-jkexsokp/hnswlib-0.7.0.dist-info' Preparing metadata (pyproject.toml) ... done Collecting clickhouse-connect>=0.5.7 (from chromadb==0.3.22) Using cached clickhouse_connect-0.5.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (922 kB) Collecting sentence-transformers>=2.2.2 (from chromadb==0.3.22) Using cached sentence_transformers-2.2.2-py3-none-any.whl Collecting duckdb>=0.7.1 (from chromadb==0.3.22) Using cached duckdb-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.2 MB) Collecting fastapi>=0.85.1 (from chromadb==0.3.22) Using cached fastapi-0.95.1-py3-none-any.whl (56 kB) Collecting uvicorn[standard]>=0.18.3 (from chromadb==0.3.22) Using cached uvicorn-0.22.0-py3-none-any.whl (58 kB) Requirement already satisfied: numpy>=1.21.6 in /home/ubuntu/.local/lib/python3.10/site-packages (from chromadb==0.3.22) (1.24.3) Collecting posthog>=2.4.0 (from chromadb==0.3.22) Using cached posthog-3.0.1-py2.py3-none-any.whl (37 kB) Requirement already satisfied: typing-extensions>=4.5.0 in /home/ubuntu/.local/lib/python3.10/site-packages (from chromadb==0.3.22) (4.5.0) Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from clickhouse-connect>=0.5.7->chromadb==0.3.22) (2020.6.20) Requirement already satisfied: urllib3>=1.26 in /usr/lib/python3/dist-packages (from clickhouse-connect>=0.5.7->chromadb==0.3.22) (1.26.5) Requirement already satisfied: pytz in /usr/lib/python3/dist-packages (from clickhouse-connect>=0.5.7->chromadb==0.3.22) (2022.1) Collecting zstandard (from clickhouse-connect>=0.5.7->chromadb==0.3.22) Using cached zstandard-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB) Collecting lz4 (from clickhouse-connect>=0.5.7->chromadb==0.3.22) Using cached lz4-4.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB) Collecting starlette<0.27.0,>=0.26.1 (from fastapi>=0.85.1->chromadb==0.3.22) Using cached starlette-0.26.1-py3-none-any.whl (66 kB) Collecting python-dateutil>=2.8.2 (from pandas>=1.3->chromadb==0.3.22) Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) Collecting tzdata>=2022.1 (from pandas>=1.3->chromadb==0.3.22) Using cached tzdata-2023.3-py2.py3-none-any.whl (341 kB) Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from posthog>=2.4.0->chromadb==0.3.22) (1.16.0) Collecting monotonic>=1.5 (from posthog>=2.4.0->chromadb==0.3.22) Using cached monotonic-1.6-py2.py3-none-any.whl (8.2 kB) Collecting backoff>=1.10.0 (from posthog>=2.4.0->chromadb==0.3.22) Using cached backoff-2.2.1-py3-none-any.whl (15 kB) Requirement already satisfied: charset-normalizer<4,>=2 in /home/ubuntu/.local/lib/python3.10/site-packages (from requests>=2.28->chromadb==0.3.22) (3.1.0) Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests>=2.28->chromadb==0.3.22) (3.3) Collecting huggingface-hub>=0.4.0 (from sentence-transformers>=2.2.2->chromadb==0.3.22) Using cached huggingface_hub-0.14.1-py3-none-any.whl (224 kB) Collecting nltk (from sentence-transformers>=2.2.2->chromadb==0.3.22) Using cached nltk-3.8.1-py3-none-any.whl (1.5 MB) Collecting scikit-learn (from sentence-transformers>=2.2.2->chromadb==0.3.22) Using cached scikit_learn-1.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB) Link requires a different Python (3.10.6 not in: '>=3.7,<3.10'): https://files.pythonhosted.org/packages/99/f1/c00d6be56e1a718a3068079e3ec8ce044d7179345280f6a3f5066068af0d/scipy-1.6.2.tar.gz (from https://pypi.org/simple/scipy/) (requires-python:>=3.7,<3.10) Link requires a different Python (3.10.6 not in: '>=3.7,<3.10'): https://files.pythonhosted.org/packages/fe/fd/8704c7b7b34cdac850485e638346025ca57c5a859934b9aa1be5399b33b7/scipy-1.6.3.tar.gz (from https://pypi.org/simple/scipy/) (requires-python:>=3.7,<3.10) Link requires a different Python (3.10.6 not in: '>=3.7,<3.10'): https://files.pythonhosted.org/packages/8e/e1/ba481fb2154410f9c5a2d875695873597a7b1bea8c7f87cf444479c3260c/scipy-1.7.0rc1.tar.gz (from https://pypi.org/simple/scipy/) (requires-python:>=3.7,<3.10) Link requires a different Python (3.10.6 not in: '>=3.7,<3.10'): https://files.pythonhosted.org/packages/a2/ae/ef8b23f5383403a597f2f79df44124a9b8f011a8beb1bca4c6b663a61d15/scipy-1.7.0rc2.tar.gz (from https://pypi.org/simple/scipy/) (requires-python:>=3.7,<3.10) Link requires a different Python (3.10.6 not in: '>=3.7,<3.10'): https://files.pythonhosted.org/packages/bb/bb/944f559d554df6c9adf037aa9fc982a9706ee0e96c0d5beac701cb158900/scipy-1.7.0.tar.gz (from https://pypi.org/simple/scipy/) (requires-python:>=3.7,<3.10) Link requires a different Python (3.10.6 not in: '>=3.7,<3.10'): https://files.pythonhosted.org/packages/47/33/a24aec22b7be7fdb10ec117a95e1e4099890d8bbc6646902f443fc7719d1/scipy-1.7.1.tar.gz (from https://pypi.org/simple/scipy/) (requires-python:>=3.7,<3.10) Collecting scipy (from sentence-transformers>=2.2.2->chromadb==0.3.22) Using cached scipy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.4 MB) Collecting sentencepiece (from sentence-transformers>=2.2.2->chromadb==0.3.22) Using cached sentencepiece-0.1.99-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB) Collecting torch>=1.6.0 (from sentence-transformers>=2.2.2->chromadb==0.3.22) Killed
Do I need mandatory python 3.9.x? 3.10.6 is installed by default and out since Aug. 2, 2022.
@linuxatico The project requires Python 3.10
as it uses match statement in privateGPT.py
@imartinez I would suggest adding a poetry
setup in addition to the requirements.txt
to make it more explicit
This can also be specified in the README
Sounds good.
I'm sorry but I think there's a misunderstanding: I actually have 3.10.6 installed and facing the issue I submitted, 3.10.6 hence is not a valid Python version? I believe the problem is at
Link requires a different Python (3.10.6 not in: '>=3.7,<3.10'):
You right I've read your issue a bit too fast. Usually when an aws
instance kills a process when installing dependencies it means you're running out of memory. Especially when it fails on the torch
installation which is quite heavy and requires over 2GB of RAM. I would suggest you upgrade your hardware or increase swap space :)