安装python3
yum -y install yum-utilsyum-builddep pythoncurl -O https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgztar xf Python-3.8.0.tgzcd Python-3.8.0./configuremakemake install
设置python3为默认版本
vi /etc/profile.d/python.sh #编辑用户自定义配置,输入alias参数?alias python=‘/usr/local/bin/python3.8‘?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/
原文地址:https://www.cnblogs.com/wintrysec/p/11963807.html
时间: 2024-10-05 00:13:12