CentOS安装Python3.7

vscode设置python3.7调试环境:https://www.cnblogs.com/dotnetcrazy/p/9095793.html

先下载一下压缩包(FTP传也一样):weget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz

目前最新:https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz

解压:tar -Jxvf Python-3.7.0.tar.xz

CentOS安装Python3.7_第1张图片

cd Python-3.7.0 设置一下配置文件,准备编译安装 ./configure prefix=/usr/local/python3

CentOS安装Python3.7_第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 kernel-devel libffi-devel

CentOS安装Python3.7_第3张图片

编译安装:make && make install(yum安装没有apt安装方便)

设置软链接:ln -s /usr/local/python3/bin/python3 /usr/bin/python3

CentOS安装Python3.7_第4张图片

转载于:https://www.cnblogs.com/dotnetcrazy/p/9360831.html

你可能感兴趣的:(CentOS安装Python3.7)