Linux开发环境配置-Python3安装(四)
- 1.python官网自行下载想要的版本,本文选择的版本是Python-3.8.3.tgz
,下载后解压 tar zxvf Python-3.8.3.tgz - 2.安装相关预备环境
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make - 3.编译并安装
cd Python-3.8.3/
./configure prefix=/usr/local/python3
make && make install
- 4.我们还需要将刚刚安装?成的?录 /usr/local/python3 ?的 python3 可执??件做?份软链接,链
接到 /usr/bin 下,?便后续使?python3
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
- 5.验证安装
|