---
title: 编译和安装
description: 1. 执行以下命令使用pip安装相关组件。
url: "https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kylin_kunpeng_flit_380_02_0008.html"
---

# 编译和安装

#### 操作步骤

1. 执行以下命令使用pip安装相关组件。

```
pip3 install virtualenv --trusted-host pypi.tuna.tsinghua.edu.cn -i https://pypi.tuna.tsinghua.edu.cn/simple
```


2. 执行以下命令创建flit安装环境。

```
python3 -m venv
/path/to/flit
source
/path/to/flit
/bin/activate
```


3. 执行以下命令安装flit。

```
cd
/path/to/flit
pip3 install docutils requests pytoml testpath responses docutils pytest
--trusted-host pypi.tuna.tsinghua.edu.cn -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install flit==3.8.0
--trusted-host pypi.tuna.tsinghua.edu.cn -i https://pypi.tuna.tsinghua.edu.cn/simple
```
