(venv) PS D:\PycharmProjects\langChainLearn> pip install llama-cpp-python
Collecting llama-cpp-python
Using cached llama_cpp_python-0.2.6.tar.gz (1.6 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: typing-extensions>=4.5.0 in d:\pycharmprojects\langchainlearn\venv\lib\site-packages (from llama-cpp-python) (4.7.1)
Requirement already satisfied: numpy>=1.20.0 in d:\pycharmprojects\langchainlearn\venv\lib\site-packages (from llama-cpp-python) (1.25.2)
Collecting diskcache>=5.6.1 (from llama-cpp-python)
Obtaining dependency information for diskcache>=5.6.1 from https://files.pythonhosted.org/packages/3f/27/4570e78fc0bf5ea0ca45eb1de3818a23787af9b3
90c0b0a0033a1b8236f9/diskcache-5.6.3-py3-none-any.whl.metadata
Using cached diskcache-5.6.3-py3-none-any.whl.metadata (20 kB)
Using cached diskcache-5.6.3-py3-none-any.whl (45 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.5.0 using CMake 3.27.5 (wheel)
*** Configuring CMake...
2023-09-18 16:59:04,497 - scikit_build_core - WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=No
loading initial cache file C:\Users\z00498ta\AppData\Local\Temp\tmpgz_51jr8\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
(venv) PS D:\PycharmProjects\langChainLearn>
(venv) PS D:\PycharmProjects\langChainLearn>
先尝试下了个CMaker 3.27.5 在windows机器安装了 (看见上面的日志里提的是这个版本)Download | CMake
但 好像是有些变量要设置,但是现在不清楚改怎么设置。