---
title: 安装Python3.7.6
description: "1. 下载Python语言源码包。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kylin_kunpeng_galaxy_2201_02_0006.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/kylin_kunpeng_galaxy_2201_02_0006.html
indexId: 11114eb76b43fa79de98bb929acd84a5a5ddaad16185326636d263cc195a81d980
---
# 安装Python3.7.6

#### 操作步骤

1. 下载Python语言源码包。

```
cd
/path/to/GALAXY
wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tar.xz
```


2. 执行以下命令，解压并安装。

```
tar -xvf Python-3.7.6.tar.xz
cd python-3.7.6
./configure --prefix=
/path/to/GALAXY/python3.7.6
make -j && make -install
```


3. 执行以下命令，添加环境变量。

```
vi
~
/.bashrc
```


4. 在打开的文件末尾追加以下内容。

```
export PATH=
/path/to/GALAXY/python3.7.6/bin:
$PATH
```


5. 退出编辑模式，执行以下命令，保存并退出。

```
wq!
```


6. 执行以下命令，使能该文件。

```
source
~
/.bashrc
```


7. 执行以下命令，验证。

```
python -V
```
