---
title: 安装Python解释器
description: 1. 使用PuTTY工具，以root用户登录服务器。
url: "https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengpysam_02_0007.html"
---

# 安装Python解释器

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令解压安装包。

```
tar xf Python-3.8.2.tar.xz
```


3. 执行以下命令进入解压后的目录。

```
cd Python-3.8.2
```


4. 执行以下命令设置生成“Makefile”。

```
./configure --prefix=
/path/to/PYTHON
```


5. 执行以下命令进行安装编译。

```
make -j 96
make install
```


6. 执行以下命令设置Python的环境变量。

```
export PATH=
/path/to/PYTHON
/bin:$PATH
```
