一、配置源以及解决依赖关系
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
yum -y install epel-release
yum -y install python-pip
二、下载
wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tar.xz
三、解包
tar -xvf Python-3.9.0.tar.xz
四、编译安装
cd Python-3.9.0
./configure prefix=/usr/local/python3
make && make install文章来源:https://www.toymoban.com/news/detail-493605.html
五、优化命令路径
ln -s /usr/local/python3/bin/python3.9 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.9 /usr/bin/pip3文章来源地址https://www.toymoban.com/news/detail-493605.html
到了这里,关于CentOS7安装python3.9 极其简单!!!的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!