Linux CentOS 8中 升级Python3.6.8到Python3.9.13

  • A+
所属分类:PHP日常

# 下载Python3.9.13
wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
tar zxvf Python-3.9.13.tgz
# 安装必须的包
dnf -y install gcc zlib* libffi-devel
cd Python-3.9.13/
./configure --prefix=/usr/local/python3 --enable-optimizations
make
make install
# 删除原先的Python3和pip3
rm -rf /usr/bin/python3
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
rm -rf /usr/bin/pip3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

python3 --version
pip3 --version
————————————————

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: