标签:read pytho 文件夹 ln -s 安装 line prefix 更新 sql
yum更新
yum update
安装python3.7依赖
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel libffi-devel gcc make
下载Python
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
解压Python包
tar -zxvf Python-3.7.4.tgz -C <欲解包路径>
配置编译:
在解包路径下
cd Python-3.7.4
新建一个安装文件夹
mkdir /usr/local/python3
配置编译的路径:
./configure --prefix=/usr/local/python3
./configure --enable-optimizations
编译安装:
make && make install
添加软连接(已执行优化选项则无需添加):
ln -s /usr/local/python3 /usr/bin/python3
标签:read pytho 文件夹 ln -s 安装 line prefix 更新 sql
原文地址:https://www.cnblogs.com/shannen/p/11345742.html