---
title: 源码编译构建
description: "获取LlamaIndex源码，从源码构建wheel并安装本地构建产物。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengai/ecosystemEnable/llamaIndex/kunpengllamaIndex_16_0005.html
sourcePath: /source/zh/kunpengai/ecosystemEnable/llamaIndex/kunpengllamaIndex_16_0005.html
indexId: aaf7283b5405fd4663f1f786a1bb989d5b6dd04bd20b0fd8b167e41b5362c34378
---
# 源码编译构建

获取LlamaIndex源码，从源码构建wheel并安装本地构建产物。

1. 获取LlamaIndex 0.14.19源码。
  1 git clone --branch v0.14.19 --depth 1 https://github.com/run-llama/llama_index.git

2. 从源码构建wheel。
  1 2 cd llama_index python3 -m build --wheel --outdir dist

  构建产物示例。

  1 llama_index-0.14.19-py3-none-any.whl

3. 安装本地构建产物。
  1 python3 -m pip install --force-reinstall dist/llama_index-0.14.19-py3-none-any.whl
