Centos7下安装Python3.7

Centos7下安装Python3.7

首先安装依赖包,centos里面是-devel,如果在ubuntu下安装则要改成-dev,依赖包缺一不可,笔者曾安装python3未成功就是因为没有安装libffi-devel

sudo yum -y groupinstall "Development tools"
sudo 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 libffi-devel

然后获取python3.7的安装包

wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0a1.tar.xz

解压

cd ~/Download
tar -xvJf  Python-3.7.0a1.tar.xz

配置python3的安装目录并安装

cd Python-3.7.0a1
./configure --prefix=/usr/local/bin/python3
sudo make
sudo make install

创建软链接

ln -s /usr/local/bin/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/bin/python3/bin/pip3 /usr/bin/pip3

最后在命令行中输入python3,能够进入python3终端即成功安装
这里写图片描述

更多相关推荐

centos7安装python3详细_centos7...

一、centos7为刚安装的1)配置yum源和epel源采用国内源查看yum的配置文件(里面的镜像网址)是否p...

继续阅读

centos7安装python3_Centos7安装...

Centos7下已自动安装Python2.7.5,but现在经常会出现Python2和Python3兼容使用的情况,所以我...

继续阅读

Centos7安装Python3.7

说明全部操作都在root用户下执行1.安装编译相关工具yum-ygroupinstall"Developmenttools"yum-y...

继续阅读

CentOS7安装Python3.7

说明全部操作都在用户下执行1.安装编译相关工具2.下载python3.7.0源码,根据需求下载   在http...

继续阅读

Centos7下安装配置Python3.7

Centos7自带的python版本是2.6,有的时候可能满足不了我们的需求,我们就要手动去装更高的版本...

继续阅读

centos7安装python3.7.4_Centos7...

如果电脑自带的python2.7先卸载1.强制删除已安装python及其关联rpm-qa|greppython|xargsrpm-ev...

继续阅读

centos7下安装、卸载Python3.7,...

参考:https://blog.csdn.net/elija940818/article/details/79238813 首先安装依赖包,centos...

继续阅读

Centos7安装Python3.7

诚邀访问我的个人博客:我在马路边更好的阅读体验点击查看原文:Centos7安装Python3.7原创博客...

继续阅读

centos7安装python3.7_CentOS7安...

我的环境CentOS7安装依赖yum更新yumupdate安装python3.7所需依赖yuminstallzlib-develbzip2-de...

继续阅读

centos7 安装 python3.7 (源码编...

1.下载(mwget工具,需要自行安装,也可以借助迅雷下载) 百度网盘地址 https://pan.baidu.com/s/...

继续阅读