本例以Linux上安装Pyhton3.8版本为例进行说明 1、依赖包安装 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 libffi-devel 2、下
本例以Linux上安装Pyhton3.8版本为例进行说明
1、依赖包安装
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 libffi-devel
2、下载包:
https://www.python.org/ftp/python/3.8.1/
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
3、解压:
tar -zxvf Python-3.8.1.tgz
4、安装:
cd Python-3.8.1 ./configure --prefix=/usr/local/python3 make && make install
5、建立软连接
ln -s /usr/local/python3/bin/python3.8 /usr/bin/python3 ln -s /usr/local/python3/bin/pip3.8 /usr/bin/pip3
6、验证是否安装成功
执行python3命令
执行pip3命令
如果执行上面命令均得到如图结果,则说明安装成功。
总结
以上所述是小编给大家介绍的Linux安装Python3.8.1的教程详解,希望对大家有所帮助!