Centos7安装Python3
程序员文章站
2022-05-29 12:17:27
...
Centos7安装Python3
1.安装依赖
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
不能忽略相关包,我之前就没有安装readline-devel导致执行python模式无法使用键盘的上下左右键;
2.下载编译安装python3
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar -zxvf Python-3.6.5.tgz
cd Python-3.6.5
./configure prefix=/usr/local/python3 && make && make install
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
上一篇: php根据参数从读取数据库记录
下一篇: 文本转HTML的php代码