关于安装llama-cpp-python报错问题解决方法

ubuntu系统下安装llama-cpp-python报错

在ubuntu操作系统通过pip install llama-cpp-python 指令安装llama-cpp-python会发生如下的报错:

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

报错原因:

  1. 我们安装的是CPU版本的llama-cpp-python,但实际通过pip安装时默认是下载最新版本的,即0.3.5版本,但是我们通过网站(https://abetlen.github.io/llama-cpp-python/whl/cpu/llama-cpp-python/)发现cpu版本的llama-cpp-python最新版本为0.3.2,导致安装失败。
    关于安装llama-cpp-python报错问题解决方法_第1张图片

解决方法

pip install llama-cpp-python==0.3.2

你可能感兴趣的:(llama,python,人工智能)