techleadhd / chatgpt-retrieval

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with required package chromadb for osx-arm64

m-balcewicz opened this issue · comments

Hi, I do have some issues installing pip install chromadb. I am using a osx-arm64 and get the following error:

Getting requirements to build wheel ... error
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.

I tried installing it for python 3.8, 3.10, and 3.11. Can you please help me out?

so fyi, you don't need chromadb. It's just for the persist functionality, which caches the vectorstore.
Just remove the codepath where PERSIST == True.

(I'm on osx silicon so I can't repro this)

Thank you very much for your quick reply. I am also working on osx silicon. I get a similar error installing pip install unstructured.

Trying to find the main error, it seems to be the path to clang? However, I have installed a recent version.

>> clang --version

Apple clang version 15.0.0 (clang-1500.0.29.1)
Target: arm64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

This ist the error I get trying installing unstructured:

creating build/temp.macosx-11.0-arm64-cpython-38
      creating build/temp.macosx-11.0-arm64-cpython-38/c
      /usr/local/opt/llvm/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/martin/opt/miniconda3/envs/ChatGPT/include -arch arm64 -fPIC -O2 -isystem /Users/martin/opt/miniconda3/envs/ChatGPT/include -arch arm64 -DFFI_BUILDING=1 -I/usr/include/ffi -I/usr/include/libffi -I/Users/martin/opt/miniconda3/envs/ChatGPT/include/python3.8 -c c/_cffi_backend.c -o build/temp.macosx-11.0-arm64-cpython-38/c/_cffi_backend.o -iwithsysroot/usr/include/ffi
      error: command '/usr/local/opt/llvm/bin/clang' failed: No such file or directory
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cffi
  Running setup.py clean for cffi
Successfully built python-docx python-pptx olefile
Failed to build lxml cffi
ERROR: Could not build wheels for lxml, cffi, which is required to install pyproject.toml-based projects

Maybe you have another idea to solve my confusion.

Setting this helped on macOS in my case:

sudo xcode-select -s /Library/Developer/CommandLineTools

https://stackoverflow.com/questions/73969269/error-could-not-build-wheels-for-hnswlib-which-is-required-to-install-pyprojec
chroma-core/chroma#189 (comment)
These are the articles that helped me you can take a look at this..basically you need to downlaod those 6 gb of microsoft developer tools..Happy to help ; )

Setting this helped on macOS in my case:

sudo xcode-select -s /Library/Developer/CommandLineTools

Thank you, @aartajew. Obviously, my env was not set up correctly. Your line of code solved it immediately.

Additionally, the following solution worked out for me:

  1. conda install -c conda-forge lxml
    I had difficulties installing pip install unstructured as you can see in my error message above, the lxml package was mainly the reason.
  2. pip install unstructured
    Worked out any further issues now.
  3. After the first test, I received the following error message: partition_pdf is not available. Install the pdf dependencies with pip install "unstructured[pdf]".
    So, installing the missing package solved any issues: pip install "unstructured[pdf]"
  4. As shown in the readme file, a quick test worked out fine.