Skip to main content

conda 安装 最新版 llama-cpp

Updated 2 min readMarkdown

由 duck AI 和 google AI 响应整理

  • 安装并激活 python 版本 3.12 指定该版本
(python312) $ conda env list
# conda environments:
#
# * -> active
# + -> frozen
base                     /home/user/miniconda3
python312            *   /home/user/miniconda3/envs/python312
  • 安装 llama.cpp
(python312) $ conda install -c conda-forge "llama.cpp>0.8" -y

验证版本

(python312) $ llama-cli  --version
version: 0.9.0 (build 12110, commit cd959bae99ff4bed22bef2604f45241c09bbb8c8)
built with GNU 14.3.0 for Linux x86_64

(python312) $ llama-server --version
version: 0.9.0 (build 12110, commit cd959bae99ff4bed22bef2604f45241c09bbb8c8)
built with GNU 14.3.0 for Linux x86_64
  • pip 安装 llama-cpp-python
(python312) $ pip install llama-cpp-python
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting llama-cpp-python
  Using cached llama_cpp_python-0.3.37.tar.gz (80.9 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting typing-extensions>=4.5.0 (from llama-cpp-python)
...
  Stored in directory: /home/user/.cache/pip/wheels/ae/3b/f1/31ece36a6f208082d0ad5433d9e07bdf0e591f4275a66e45c1
Successfully built llama-cpp-python
Installing collected packages: typing-extensions, numpy, MarkupSafe, diskcache, jinja2, llama-cpp-python
Successfully installed MarkupSafe-3.0.4 diskcache-5.6.3 jinja2-3.1.6 llama-cpp-python-0.3.37 numpy-2.5.5 typing-extensions-4.16.0

检查库是否能正常导入并查看版本号

(python312) $ python -c "import llama_cpp; print('版本:', llama_cpp.version)" 
版本: 0.3.37

(python312) $ conda list llama
# packages in environment at /home/user/miniconda3/envs/python312:
#
# Name                     Version          Build                    Channel
libllama                   0.9.0            cpu_openblas_hfc667b1_0  anaconda
llama-cpp-python           0.3.37           pypi_0                   pypi
llama.cpp                  0.9.0            cpu_openblas_hfc667b1_0  anaconda
  • 参考文章
https://zachthinking.github.io/posts/huggingface-mirror/
hf-mirror.com:HuggingFace 国内镜像加速实测(2026年11月)

https://zachthinking.github.io/posts/github-proxy-mirror/
GitHub 加速镜像最新可用地址(2026年11月实测)

About the author

  • 酷愛計算機技術Ardently Love Computer Technology 長期關註反洗錢反欺詐Long-term Focus on Anti-Money Laundering and Anti-Fraud 精通支付結算的技術、系統、流程和製度Proficient in the Technology, System, Process and Institution of Payment and Settlement

No comments yet. Be the first to comment.

More from this blog