Linux 升级 Python 至 3.x

时间:2022-06-23 02:43:55

https://docs.python.org/3.5/library/json.html 在线手册

(1)下载wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz (wget下载解析不过的话直接pc下载上传至linux系统)

(2)下载完后解压tar -zxvf Python-3.5.2.tgz

(3)进入解压目录路径/usr/local/Python-3.5.2

(4)执行安装配置./configure

(5)执行make 

(6)执行make install

(7)验证版本:

    python -V
    Python 2.7.5
    python3 -V
    Python 3.5.2