码迷,mamicode.com
首页 > 编程语言 > 详细

centos7 安装python3.8

时间:2020-05-02 00:13:10      阅读:476      评论:0      收藏:0      [点我收藏+]

标签:Fix   conf   http   ftp   创建   readline   sqli   ack   pytho   

 

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.下载安装包解压
wget https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz
tar -xvJf Python-3.8.2.tar.xz


3.编译安装
mkdir /usr/local/python3
cd Python-3.8.2/
./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.验证是否成功
[root@xxx Python-3.8.2]# python3 -V
Python 3.8.2
[root@xxx Python-3.8.2]# pip3 -V
pip 19.2.3 from /usr/local/python3/lib/python3.8/site-packages/pip (python 3.8)

 

 

 

 

 

 

 

centos7 安装python3.8

标签:Fix   conf   http   ftp   创建   readline   sqli   ack   pytho   

原文地址:https://www.cnblogs.com/sea-stream/p/12815341.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!