当前位置 : 主页 > 编程语言 > python >

centos7安装python3

来源:互联网 收集:自由互联 发布时间:2022-09-02
1.准备安装工具 yum groupinstall "Development tools" yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-develtk-devel gdbm-devel db4-devel libpcap-devel xz-devel 2.下载python3源码 wget https://www.

1.准备安装工具

yum groupinstall "Development tools"

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-develtk-devel gdbm-devel db4-devel libpcap-devel xz-devel

2.下载python3源码

wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz

3.解压

tar xf Python-3.7.5.tgz ./

4.进入下载目录

cd Python-3.7.5

5.编译

./configure --prefix=/usr/local/python3
make&& make install

6.创建软链接

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



上一篇:python3 操作excel
下一篇:没有了
网友评论