private-gpt
private-gpt copied to clipboard
Installation fails on Apple Silicon with ValueError: list.remove(x): x not in list
When I get to the step of installing hnswlib, I get:
Collecting hnswlib>=0.7 (from chromadb==0.3.22->-r requirements.txt (line 3))
Downloading hnswlib-0.7.0.tar.gz (33 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Traceback (most recent call last):
File "/Users/dpetrovs/ghq/github.com/imartinez/privateGPT/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/dpetrovs/ghq/github.com/imartinez/privateGPT/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/dpetrovs/ghq/github.com/imartinez/privateGPT/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/7w/vj7k1xyx5h9510b_dbj46_y40000gn/T/pip-build-env-ecewwg_d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/private/var/folders/7w/vj7k1xyx5h9510b_dbj46_y40000gn/T/pip-build-env-ecewwg_d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/private/var/folders/7w/vj7k1xyx5h9510b_dbj46_y40000gn/T/pip-build-env-ecewwg_d/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 74, in <module>
File "<string>", line 91, in BuildExt
ValueError: list.remove(x): x not in list
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
Environment: macOS Ventura, with virtualenv, Python 3.10.6, with HNSWLIB_NO_NATIVE=1
I had no issues with Mac M1 on Ventura 13.3 and Python 3.9.16
I described the solution in my blog: https://romanorac.medium.com/how-to-install-langchain-on-an-m2-macbook-755be61125b6?sk=0a433aa7924075239aae8a2e5dd09728