Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems installing Chroma #15

Open
orenplevin opened this issue May 5, 2023 · 3 comments
Open

Problems installing Chroma #15

orenplevin opened this issue May 5, 2023 · 3 comments

Comments

@orenplevin
Copy link

Sounds like a great project would love for it to work....

Describe the bug
After entering the keys in keys.json
Typed to run - ./run.sh start

python: can't open file '/Users/xxx/Documents/GPT/GPT-Swarm/scripts/check_requirements.py': [Errno 2] No such file or directory
Traceback (most recent call last):
File "/Users/xxx/anaconda3/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/xxx/anaconda3/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/xxx/Documents/GPT/GPT-Swarm/swarmai/main.py", line 7, in
from swarmai.Swarm import Swarm
File "/Users/xxx/Documents/GPT/GPT-Swarm/swarmai/Swarm.py", line 14, in
from swarmai.utils.memory import VectorMemory
File "/Users/xxx/Documents/GPT/GPT-Swarm/swarmai/utils/memory/init.py", line 1, in
from .VectorMemory import VectorMemory
File "/Users/xxx/Documents/GPT/GPT-Swarm/swarmai/utils/memory/VectorMemory.py", line 2, in
from langchain.vectorstores import Chroma
ModuleNotFoundError: No module named 'langchain'
Press any key to continue...

@VladSam42
Copy link
Collaborator

fixed with the latest commits: edfddce, 81a778f

@orenplevin
Copy link
Author

Thanks @nicelir1996
Its starting up now installing requirements but ends up with the same error
ModuleNotFoundError: No module named 'langchain'

I start to get errors here --

Building wheels for collected packages: hnswlib
Building wheel for hnswlib (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for hnswlib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
running bdist_wheel
running build
running build_ext
creating var
creating var/folders
creating var/folders/xm
creating var/folders/xm/dkzx730j35v752l5jnlwq89w0000gn
creating var/folders/xm/dkzx730j35v752l5jnlwq89w0000gn/T
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c /var/folders/xm/dkzx730j35v752l5jnlwq89w0000gn/T/tmp0xdv73ux.cpp -o var/folders/xm/dkzx730j35v752l5jnlwq89w0000gn/T/tmp0xdv73ux.o -std=c++14
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c /var/folders/xm/dkzx730j35v752l5jnlwq89w0000gn/T/tmplv6dlde_.cpp -o var/folders/xm/dkzx730j35v752l5jnlwq89w0000gn/T/tmplv6dlde_.o -fvisibility=hidden
building 'hnswlib' extension
creating build
creating build/temp.macosx-10.9-universal2-cpython-311
creating build/temp.macosx-10.9-universal2-cpython-311/python_bindings
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/private/var/folders/xm/dkzx730j35v752l5jnlwq89w0000gn/T/pip-build-env-3yshhfgd/overlay/lib/python3.11/site-packages/pybind11/include -I/private/var/folders/xm/dkzx730j35v752l5jnlwq89w0000gn/T/pip-build-env-3yshhfgd/overlay/lib/python3.11/site-packages/numpy/core/include -I./hnswlib/ -I/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c ./python_bindings/bindings.cpp -o build/temp.macosx-10.9-universal2-cpython-311/./python_bindings/bindings.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO="0.7.0" -std=c++14 -fvisibility=hidden
clang: error: the clang compiler does not support '-march=native'
error: command '/usr/bin/clang' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for hnswlib
Failed to build hnswlib
ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
Traceback (most recent call last):
File "/Users/xxx/anaconda3/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/xxx/anaconda3/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/xxx/Documents/GPT-Swarm/swarmai/main.py", line 7, in
from swarmai.Swarm import Swarm
File "/Users/xxx/Documents/GPT-Swarm/swarmai/Swarm.py", line 14, in
from swarmai.utils.memory import VectorMemory
File "/Users/xxx/Documents/GPT-Swarm/swarmai/utils/memory/init.py", line 1, in
from .VectorMemory import VectorMemory
File "/Users/xxx/Documents/GPT-Swarm/swarmai/utils/memory/VectorMemory.py", line 2, in
from langchain.vectorstores import Chroma
ModuleNotFoundError: No module named 'langchain'
Press any key to continue...

@VladSam42
Copy link
Collaborator

hm... strange. Seems like a chromadb problem: pypa/packaging-problems#648

Seems like it needs the c++ compiler. Since you are on mac, follow this: http://cs.millersville.edu/~gzoppetti/InstallingGccMac.html
or you can also try xcode-select --install

If this doesn't help:

  • Did you recently do something with the default gcc compiler? Could you please run and post here: gcc --version, which gcc
  • Also describe your environment: python3 --version and python3 -m pip list
  • Could you please describe your mac system, i'll try to reproduce it.
  • you can also try to install the bad package manually pip3 install hnswlib
  • in general, just in case, i recommend using either conda or a virtual environment with a give requirements.txt to make sure that there is no clash between packages (the newest langchain version breaks chroma for example)

@VladSam42 VladSam42 reopened this May 5, 2023
@VladSam42 VladSam42 changed the title ModuleNotFoundError: No module named 'langchain' Problems installing Chroma May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants