目录
6.并将/usr/local/python3/bin加入PATH
1.安装依赖环境
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
2.下载Python3
1.进入opt文件目录下,cd opt/
2.下载python3 (可以到官方先看最新版本多少)
输入命令 wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
如果出现 找不到wget命令,输入yum -y install wget,安装其依赖将会被安装
3.安装Python3
安装在/usr/local/python3(具体安装位置看个人喜好)
(1)创建目录: mkdir -p /usr/local/python3
(2