- 需求:我们的算法课程使用的python,蓝桥杯使用的java,总之开始了
- 检测环境中是否有python,查看版本
python -V
默认带2.7.5
安装python其他可能遇到的依赖
yum install
- 检查安装基础命令
wget
如果没有安装
yum -y install wget
- 下载安装包解压
wget
sudo tar
- 编译安装
./configure --prefix=/usr/local/software/Python-3.8.2
make && make install
- 创建软链接
sudo ln
sudo ln
- 验证是否成功
python3 -V
pip3 -V
[lidengyin@ldy Python-3.8.2]$ python3 -V
Python 3.8.2
[lidengyin@ldy Python-3.8.2]$ pip3 -V
pip 19.2.3 from /usr/local/software/Python-3.8.2/lib/python3.8/site-packages/pip (python 3.8)
[lidengyin@ldy Python-3.8.2]$