-1

I downloaded a project from github to work on. This repository had a "requirements.txt" file for downloading all the necessary packages for this project. The following is what the requirements.txt file looks like:

# Natural Language Processing
langchain==0.0.191
chromadb==0.3.22
llama-cpp-python==0.1.48
pdfminer.six==20221105
InstructorEmbedding
sentence-transformers
faiss-cpu
huggingface_hub
transformers
protobuf==3.20.0
torch
# auto-gptq

# Utilities
urllib3==1.26.6
accelerate
bitsandbytes
click
flask
requests

# Excel File Manipulation
openpyxl

When I run this file using the following command: "pip install -r requirements.txt" i get the following error.

Building wheels for collected packages: llama-cpp-python, hnswlib
  Building wheel for llama-cpp-python (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [131 lines of output]
      
      
      --------------------------------------------------------------------------------
      -- Trying 'Ninja' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.5 will be removed from a future version of
        CMake.
      
        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.
      
      Not searching for unused variables given on the command line.
      
      -- The C compiler identification is unknown
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - failed
      -- Check for working C compiler: /usr/bin/cc
      -- Check for working C compiler: /usr/bin/cc - broken
      CMake Error at /private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-8t5n2pbi/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
        The C compiler
      
          "/usr/bin/cc"
      
        is not able to compile a simple test program.
      
        It fails with the following output:
      
          Change Dir: '/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-install-i47as5bx/llama-cpp-python_45fa49eac29947c098c8e153799134ac/_cmake_test_compile/build/CMakeFiles/CMakeScratch/TryCompile-HOx3Da'
      
          Run Build Command(s): /private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-8t5n2pbi/overlay/lib/python3.11/site-packages/ninja/data/bin/ninja -v cmTC_afc41
          [1/2] /usr/bin/cc   -arch x86_64 -o CMakeFiles/cmTC_afc41.dir/testCCompiler.c.o -c /private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-install-i47as5bx/llama-cpp-python_45fa49eac29947c098c8e153799134ac/_cmake_test_compile/build/CMakeFiles/CMakeScratch/TryCompile-HOx3Da/testCCompiler.c
          FAILED: CMakeFiles/cmTC_afc41.dir/testCCompiler.c.o
          /usr/bin/cc   -arch x86_64 -o CMakeFiles/cmTC_afc41.dir/testCCompiler.c.o -c /private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-install-i47as5bx/llama-cpp-python_45fa49eac29947c098c8e153799134ac/_cmake_test_compile/build/CMakeFiles/CMakeScratch/TryCompile-HOx3Da/testCCompiler.c
          xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
          ninja: build stopped: subcommand failed.
      
      
      
      
      
        CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
        CMakeLists.txt:3 (ENABLE_LANGUAGE)
      
      
      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Ninja' generator - failure
      --------------------------------------------------------------------------------
      
      
      
      --------------------------------------------------------------------------------
      -- Trying 'Unix Makefiles' generator
      --------------------------------
      ---------------------------
      ----------------------
      -----------------
      ------------
      -------
      --
      CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.5 will be removed from a future version of
        CMake.
      
        Update the VERSION argument <min> value or use a ...<max> suffix to tell
        CMake that the project does not need compatibility with older versions.
      
      Not searching for unused variables given on the command line.
      
      -- The C compiler identification is unknown
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - failed
      -- Check for working C compiler: /usr/bin/cc
      -- Check for working C compiler: /usr/bin/cc - broken
      CMake Error at /private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-8t5n2pbi/overlay/lib/python3.11/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
        The C compiler
      
          "/usr/bin/cc"
      
        is not able to compile a simple test program.
      
        It fails with the following output:
      
          Change Dir: '/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-install-i47as5bx/llama-cpp-python_45fa49eac29947c098c8e153799134ac/_cmake_test_compile/build/CMakeFiles/CMakeScratch/TryCompile-veszyf'
      
          Run Build Command(s): /private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-8t5n2pbi/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_8e4c5/fast
          xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      
      
      
      
      
        CMake will not be able to correctly generate this project.
      Call Stack (most recent call first):
        CMakeLists.txt:3 (ENABLE_LANGUAGE)
      
      
      -- Configuring incomplete, errors occurred!
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Unix Makefiles' generator - failure
      --------------------------------------------------------------------------------
      
                      ********************************************************************************
                      scikit-build could not get a working generator for your system. Aborting build.
      
                      Building MacOSX wheels for Python 3.11 requires XCode.
      Get it here:
      
        https://developer.apple.com/xcode/
      
                      ********************************************************************************
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llama-cpp-python
  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
  ╰─> [66 lines of output]
      running bdist_wheel
      running build
      running build_ext
      creating var
      creating var/folders
      creating var/folders/cb
      creating var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn
      creating var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/osama/opt/anaconda3/envs/local-llm/include -fPIC -O2 -isystem /Users/osama/opt/anaconda3/envs/local-llm/include -I/Users/osama/opt/anaconda3/envs/local-llm/include/python3.11 -c /var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/tmpp2xw_ese.cpp -o var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/tmpp2xw_ese.o -std=c++14
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      clang -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/osama/opt/anaconda3/envs/local-llm/include -fPIC -O2 -isystem /Users/osama/opt/anaconda3/envs/local-llm/include -I/Users/osama/opt/anaconda3/envs/local-llm/include/python3.11 -c /var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/tmpua2_va97.cpp -o var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/tmpua2_va97.o -std=c++11
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      Traceback (most recent call last):
        File "/Users/osama/opt/anaconda3/envs/local-llm/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/osama/opt/anaconda3/envs/local-llm/lib/python3.11/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/osama/opt/anaconda3/envs/local-llm/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 416, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
          self.run_setup()
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 116, in <module>
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 346, in run
          self.run_command("build")
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
          super().run_command(command)
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 84, in run
          _build_ext.run(self)
        File "/private/var/folders/cb/xv2ysbzn4894z3v_mrcs59ym0000gn/T/pip-build-env-pnhr60w8/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "<string>", line 103, in build_extensions
        File "<string>", line 70, in cpp_flag
      RuntimeError: Unsupported compiler -- at least C++11 support is needed!
      [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 llama-cpp-python hnswlib
ERROR: Could not build wheels for llama-cpp-python, hnswlib, which is required to install pyproject.toml-based projects

From here I started to get an error Note: I'm using the Macbook pro M2 chip.

  • The real error seems to be "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun". See https://stackoverflow.com/search?q=xcrun%3A+error%3A+invalid+active+developer+path+missing+xcrun – phd Jul 27 '23 at 11:35
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 27 '23 at 21:42

0 Answers0