001、查看系统
[root@PC1 ~]# cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core)
002、安装环境依赖
[root@PC1 home]# yum groups mark install "Development Tools" [root@PC1 home]# yum groups mark convert "Development Tools" [root@PC1 home]# yum groupinstall "Development Tools"
yum -y install gcc install zlib zlib-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel uuid-devel libffi libffi-devel
yum -y install gcc epel-release
yum -y install openssl-devel openssl11 openssl11-devel export CFLAGS=$(pkg-config --cflags openssl11) export LDFLAGS=$(pkg-config --libs openssl11)
003、下载最近python安装包、并编译
wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tgz tar -xzvf Python-3.11.1.tgz cd Python-3.11.1/ ./configure make make install
注:有一个模块_tkinter一直安装不上,目前未找到原因。
004、测试python命令
[root@PC1 Python-3.11.1]# ./python --version Python 3.11.1
标签:11,python,3.11,devel,centos7,Python,yum,install From: https://www.cnblogs.com/liujiaxin2018/p/17020817.html