源码安装 python3.7

yum install libffi-devel openssl -y
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
tar xf Python-3.7.4.tgz
cd Python-3.7.4
./configure --prefix=/usr/local/python3 && make -j4 && make install
rm -rf Python-3.7.4*

添加环境变量

cat /etc/bashrc

PATH=$PATH:$HOME/bin:/usr/local/python3/bin
export PATH

猜你喜欢

转载自www.cnblogs.com/cptao/p/12126513.html