分类目录归档:AI

windows下安装llama-cpp-python失败的处理

想尝试python使用llama-cpp的功能,在windows下安装llama-cpp-python时,会报错。

PS C:\Users\xxxx> pip install llama-cpp-python
...
...
Building wheels for collected packages: llama-cpp-python
  Running command Building wheel for llama-cpp-python (pyproject.toml)
  *** scikit-build-core 0.9.9 using CMake 3.30.1 (wheel)
  *** Configuring CMake...
  2024-07-31 15:38:35,991 - 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\xxxx\AppData\Local\Temp\tmp95k50mhv\build\CMakeInit.txt
  -- Building for: NMake Makefiles
  CMake Error at CMakeLists.txt:3 (project):
    Running

     'nmake' '-?'

    failed with:

     no such file or directory

  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
  error: subprocess-exited-with-error

  × Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
...
...

继续阅读