---
title: 编译和安装
description: "1. 使用PuTTY工具，以root用户登录服务器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengchainer_02_0008.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengchainer_02_0008.html
indexId: 33f01fac99abc04c47ae908676375eed1b8645196584e728fafa583ef8760abb69
---
# 编译和安装

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令激活环境。

```
source
/path/to/chainer
/bin/activate
```


3. 执行以下命令进入到chainer环境。

```
cd
/path/to
/chainer
```


4. 执行以下命令安装chainer。

```
pip3 install chainer==7.8.1 --trusted-host mirrors.tools.huawei.com -i http://mirrors.tools.huawei.com/pypi/simple
```


  回显显示信息如下图所示。
