CentOS安装python3
2021-06-06 21:04
标签:openssl 目录 编译安装 fedora dha epo www ansi lock 补充当前系统信息 CentOS安装python3 标签:openssl 目录 编译安装 fedora dha epo www ansi lock 原文地址:https://www.cnblogs.com/wjlv/p/14600209.html
wget http://npm.taobao.org/mirrors/python/3.7.5/Python-3.7.5.tgz
yum install -y gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
tar -zxvf Python-3.7.5.tgz
/opt/python37
)
cd Python-3.7.5
./configure --prefix=/opt/python37
make && make install
ln -s /opt/python37/bin/python3 /usr/bin/python3
ln -s /opt/python37/bin/pip3 /usr/bin/pip3
[root@it bin]# python3 -V
Python 3.7.5
[root@it bin]#
[root@it bin]#
[root@it bin]# python3
Python 3.7.5 (default, Mar 31 2021, 09:48:01)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
[root@it ~]#
[root@it ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
[root@it ~]# uname -a
Linux it.novalocal 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@it ~]#
[root@it ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@it ~]#
上一篇:队列的链式表示和实现(C语言)