记录生活
分享美好

centos8 安装python 3.8.1教程

安装过程中出现这样那样的错误,终于摸索出来成功安装的方法。

所以在这里,把成功安装的过程记录在下面,以供参考:

安装准备:(cnetos安装python3.6 也可以参考)

yum -y install wget

yum -y install setup

yum -y install perl

yum install openssl-devel -y

yum install zlib-devel -y

安装:

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 -y libffi-devel zlib1g-dev

yum install zlib* -y

yum install libffi-devel -y

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

tar -xvJf Python-3.8.1.tar.xz

mkdir /usr/local/python3

cd Python-3.8.1

./configure --prefix=/usr/local/python3 --enable-optimizations --with-ssl

make && make install

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

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

pip3 install --upgrade pip

期间遇见安装“pip3 install –upgrade pip”时提示SSL问题:

 rpm -aq|grep openssl 
yum install openssl-devel -y

然后再重新配适

./configure --prefix=/usr/local/python3 --enable-optimizations --with-ssl 
make && make install
赞(0)
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权
文章名称:《centos8 安装python 3.8.1教程》
文章链接:https://www.lanxh.com/530.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。部分内容来源于网络如有版权问题请联系删除:admin@lanxh.com

评论 抢沙发

评论前必须登录!

 

登录

找回密码

注册