yum -y install yum-utils
yum-builddep python
curl -O https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz
tar xf Python-3.8.0.tgz
cd Python-3.8.0
./configure
make
make install

设置python3为默认版本

vi /etc/profile.d/python.sh         #编辑用户自定义配置,输入alias参数
alias python='/usr/local/bin/python3.8'  #这里写你的python路径
source /etc/profile.d/python.sh     #重启会话使配置生效

安装pip

wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py -i https://pypi.tuna.tsinghua.edu.cn/simple/

 

相关文章:

  • 2021-06-30
  • 2021-08-03
  • 2022-12-23
  • 2021-11-19
  • 2021-11-22
猜你喜欢
  • 2021-05-20
  • 2021-07-21
  • 2021-04-15
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2022-02-24
相关资源
相似解决方案