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

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 将Python源码包上传至“/path/to/PYTHON”目录下。
3. 执行以下命令解压Python安装包。

```
cd
/
path/to/PYTHON
tar -zxvf Python-2.5.tgz
```


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

```
cd Python-2.5
```


5. 执行以下命令进行配置。

```
SVNVERSION=not-found ./configure --prefix=
path/to/PYTHON
```


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

```
make -j 16
make install
```


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

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