1 yum -y groupinstall "Development tools" 2 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel 3 yum install libffi-devel -y
1 cd #回到用戶目錄 2 wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz 3 tar -xvJf Python-3.7.0.tar.xz
1 mkdir /usr/local/python3 #建立編譯安裝目錄 2 cd Python-3.7.0 3 ./configure --prefix=/usr/local/python3 4 make && make install
1 ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3 2 ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3
1 python3 -V 2 pip3 -V