守听 发表于 2025-4-22 11:58:42

【Python3.12.9安装llama-cpp-python遇到编译报错题目解决】

1.llama-cpp-python报错:

ERROR: Failed building wheel for llama-cpp-python
Failed to build llama-cpp-python
ERROR: Failed to build installable wheels for some pyproject.toml based projects (llama-cpp-python)
https://i-blog.csdnimg.cn/direct/cf1d1ba799784ef3afebc43a8637fdfe.png
2.缘故原由是:llama-cpp-python安装依靠微软的编译工具

https://i-blog.csdnimg.cn/direct/c8f9651010c04806af6ad1ec5ca55c21.png
3.解决办法就是安装编译工具:visual build tools

https://i-blog.csdnimg.cn/direct/dd446a0e28ee43129d35b64a9dff0269.png
只需要勾选 Desktopdevelopment with C++安装即可,Optional默认即可,也可以按需勾选
https://i-blog.csdnimg.cn/direct/8f1814621b4544e3827b9e66c0939e26.png
再实行命令安装即可成功
pip install llama-cpp-python
https://i-blog.csdnimg.cn/direct/047b75c4f0444e4fb159978d45a0cccd.png
Python 3.12.9 版本的llama-cpp-python就编译完成了
4.觉得编译麻烦的,下载我编译的试试: llama_cpp_python-0.3.8-cp312-cp312-win_amd64.whl


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: 【Python3.12.9安装llama-cpp-python遇到编译报错题目解决】