Centos7-安装py3
Posted kylingx
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos7-安装py3相关的知识,希望对你有一定的参考价值。
安装依赖
yum install gcc openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel libffi-devel tk-devel wget curl-devel -y
wget下载链接
cd /tmp
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
解压tgz包
tar -zxvf Python-3.7.4.tgz
编译安装
cd Python-3.7.4
./configure prefix=/usr/local/python3
make && make install
创建软链接
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
以上是关于Centos7-安装py3的主要内容,如果未能解决你的问题,请参考以下文章