centos6.8 安装python3.6

1.下载Python安装包

cd /usr/local/src

wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz 

2.解压

tar -zxvf Python-3.6.0.tgz

3.进入解压目录

cd Python-3.6.0

4.编译安装文件

./configure --prefix=/usr/local/python
make && make install

5.添加环境变量

echo PATH='/usr/local/python/bin/:$PATH' >> /etc/profile

source /etc/profile

6.运行

python3.6

你可能感兴趣的:(系统环境)