在centos7下安装python3.7.9
1、安装各种依赖包
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 libffi-devel |
2、下载python3.7.9安装包并解压缩
1 | wget "https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tgz" |
3、编译安装
1 | cd Python-3.7.9 |
4、创建软链接
1 | ln -s /usr/local/python3/bin/python3 /usr/bin/python3 |
5、验证
1 | [root@seeker-01 ~]# python |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 MF Blog!