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
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
tar -zxf installpackage/Python-3.6.4.tgz
cd Python-3.6.4.tgz
./configure --prefix=/usr/bin/python3.6.4
make
make install
cd /usr/bin/python3.6.4
ln -s /usr/bin/python3.6.4/bin/python3 /usr/bin/python3
cp pip3 /usr/bin
cp pip3.6 /usr/bin
[root@localhost bin]# python3 -V
Python 3.6.4
[root@localhost bin]# pip3 -V
pip 9.0.1 from /application/python3.6.4/lib/python3.6/site-packages (python 3.6)
[root@localhost bin]#
本文来自博客园,作者:孙龙-程序员,转载请注明原文链接:https://www.cnblogs.com/sunlong88/articles/9554568.html