---
title: 环境配置
description: "在进行源码编译构建前需要安装对应版本的依赖组件。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengai/ecosystemEnable/safetensors/kunpengsafetensors_16_0004.html
sourcePath: /source/zh/kunpengai/ecosystemEnable/safetensors/kunpengsafetensors_16_0004.html
indexId: 835dee8495a258e34fac2b589162df29cf02e02c7f1cf2f820025850883b4cc080
---
# 环境配置

在进行源码编译构建前需要安装对应版本的依赖组件。

1. 安装系统依赖。
  1 2 3 4 dnf install -y \ --setopt=install_weak_deps=False \ --setopt=tsflags=nodocs \ python3-pip python3-devel gcc gcc-c++ make git rust cargo

2. 安装Python构建工具。
  1 python3 -m pip install --upgrade pip setuptools wheel maturin

3. 安装NumPy。
  1 python3 -m pip install numpy==2.4.4

  以下验证示例会使用NumPy构造张量数据，所以须提前安装。
