Centos8安装Python3 pip

逆水行舟用力撑,一篙松劲退千寻。这篇文章主要讲述Centos8安装Python3 pip相关的知识,希望能为你提供帮助。
安装环境准备:

yum update -y

安装 gcc和make插件
yum install gcc gcc-c++ yum -y install gcc automake autoconf libtool make yum groupinstall -y Development Tools yum install -y gcc openssl-devel bzip2-devel libffi-devel

下载和编译python
https://www.python.org/ftp/python/
wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz

解压缩
tar -zxvf Python-3.9.7.tgz

用脚本检验整个编译环境
cd Python-3.9.7 ./configure prefix=/usr/local/python3 --enable-optimizations

【Centos8安装Python3 pip】make命令编译安装
make & & make install

修改环境变量
export PATH=$PATH:/usr/local/python3/bin/

安装PIP
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3.9 get-pip.py 测试 #python -V


    推荐阅读