Error while installing llama-cpp dependency

26 Views Asked by At

I am trying to run this project. However pip install -r requirements.txt is failing with error given below

Using cached cffi-1.16.0-cp312-cp312-win_amd64.whl (181 kB)
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Building wheels for collected packages: llama-cpp-python
  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
  ╰─> [20 lines of output]
      *** scikit-build-core 0.8.2 using CMake 3.28.3 (wheel)
      *** Configuring CMake...
      2024-03-19 14:33:40,107 - scikit_build_core - WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None
      loading initial cache file C:\Users\datta\AppData\Local\Temp\tmpaem_kr7a\build\CMakeInit.txt
      -- Building for: NMake Makefiles
      CMake Error at CMakeLists.txt:3 (project):
        Running

         'nmake' '-?'

        failed with:

         The system cannot find the file specified


      CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
      CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
      -- Configuring incomplete, errors occurred!

      *** CMake configuration failed
      [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
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects

I am running on Windows 11 pro 64 bit OS. I have installed gcc and gc++ using mingw installer.

Below is the content in my requirements.txt

llama-cpp-python 
cached_property
farm-haystack
fastapi
uvicorn
farm-haystack[weaviate]
pypdf
torch
sentence_transformers
haystack-ai
0

There are 0 best solutions below