參考

 

https://liam.page/2019/03/19/compile-and-install-Python-3-7-2-on-CentOS-7/

https://segmentfault.com/a/1190000015628625

https://tecadmin.net/install-python-3-7-on-centos/

 

wget 的網址可以換成任一個 3 的版本

 


yum install gcc openssl-devel bzip2-devel libffi-devel
yum install -y ncurses-libs zlib-devel mysql-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel uuid-devel libuuid-devel libffi-devel

yum -y install epel-release 

yum install python-pip
pip install --upgrade pip

pip install wget

cd /root/
wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
tar xzf Python-3.7.3.tgz

cd Python-3.7.3
./configure --enable-optimizations
make altinstall

python3.7 -V

    全站熱搜

    喵兒貴 發表在 痞客邦 留言(0) 人氣()