共计 561 个字符,预计需要花费 2 分钟才能阅读完成。
1. 装置编译相干工具
#yum -y groupinstall "Development tools"
#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
#yum install libffi-devel -y
2. 下载安装包解压
#cd ~
#wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz
#tar -xvJf Python-3.7.0.tar.xz
3. 编译装置
#mkdir /usr/local/python3 #创立编译装置目录
#cd Python-3.7.0
#./configure --prefix=/usr/local/python3
#make && make install
4. 创立软连贯
#ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3
#ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3
5. 验证是否胜利
#python3 -V
#pip3 -V
正文完