百度飞桨
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

安装

[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]# 
内容来源于网络如有侵权请私信删除

文章来源: 博客园

原文链接: https://www.cnblogs.com/vipsoft/p/17409174.html

你还没有登录,请先登录注册
  • 还没有人评论,欢迎说说您的想法!