centos8安装python3.8

centos8安装python3.8

1,先安装依赖包

yum -y install zlib*

yum -y install nano wget epel-release gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel xz-devel libffi-devel

2,下载python3.8文件 wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
3,解压 tar -xvf ./Python-3.8.5.tgz
4,新建文件夹 mkdir /usr/local/python3
5,进入文件夹 cd Python-3.8.5
6,编译 ./configure --prefix=/usr/local/python3 --with-ssl
7,安装 make && make install

#如果提示没有按照make运行以下命令
yum -y install gcc automake autoconf libtool make
yum install gcc gcc-c++

8,删除冲突文件
rm -rf /usr/bin/python3
rm -rf /usr/bin/pip3
9,设置软连接
ln -s /usr/local/python3/bin/python3.8 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.8 /usr/bin/pip3

10,升级pip
/usr/local/python3/bin/python3.8 -m pip install --upgrade pip

11,安装依赖包

pip3 install wheel

12,查看版本

python3 -V

pip3 -V

原文链接:https://www.cnblogs.com/cui830608/p/15078762.html


标题:centos8安装python3.8
作者:Curry
地址:http://bolo.it-cxy.top/articles/2024/10/25/1729827006886.html

    评论
    0 评论
avatar

取消