百度飞桨
PaddlePaddle 2.4.0 => Python 3.7.4
PaddlePaddle 2.4.1+ => Python 3.9.0
下载
# 安装依赖 [root@localhost ~]# yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel # 下载 Python 3.7 【可以用讯雷下好,拖到 Linx 中】 [root@localhost ~]# wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz [root@localhost ~]# tar -zxvf Python-3.7.4.tgz
安装 改变 python
[root@localhost ~]# cd Python-3.7.4 # 配置安装路径, [root@localhost Python-3.7.4]# ./configure prefix=/usr/local/python3.7 # 编译安装python3 [root@localhost Python-3.7.4]# make && make install # 将原来的链接备份 [root@localhost Python-3.7.4]# mv /usr/bin/python /usr/bin/python2.7.bak [root@localhost Python-3.7.4]# mv /usr/bin/pip /usr/bin/pip2.7.bak # 添加python3的软链接 [root@localhost Python-3.7.4]# ln -s /usr/local/python3.7/bin/python3.7 /usr/bin/python [root@localhost Python-3.7.4]# ln -s /usr/local/python3.7/bin/pip3 /usr/bin/pip # 测试是否安装成功了 [root@localhost Python-3.7.4]# python -V Python 3.7.4 [root@localhost Python-3.7.4]# pip -V pip 19.0.3 from /usr/local/python3.7/lib/python3.7/site-packages/pip (python 3.7) [root@localhost Python-3.7.4]#