(1)接收文件,保存到服务器的:home/Desktop
(2)打开terminal,进入包存放的目录:输入:cd ./Desktop
解压缩x86_64包:输入:tar -zxvf yz_pydeps_x86_64 -C ./
(3)进入解压缩后的文件夹:输入:cd x86_64
执行安装:输入:sudo rpm -Uvh *.rpm --nodeps --force
此时出现以下内容即为成功
(4)安装python
打开terminal
创建目录,输入:mkdir -p /usr/local/yzsoftware/python
移动包到安装目录,输入:mv ./Python-3.8.0.tar.xz /usr/local/yzsoftware/python
解压缩,输入:tar -zxvf /usr/local/yzsoftware/python/Python-3.8.0.tar.xz
进入解压缩后的目录,输入:cd /usr/local/yzsoftware/python/Python-3.8.0
进入安装程序,输入:./configure --prefix=/usr/local/yzsoftware/python/
编译安装,输入:make && make install
此时出现以下内容即为成功
(5)设置软链接
先输入:ll /usr/bin |grep python 查看当前是否存在python的软连接
1)若已存在软连接(如上图,python 指向了 python2),则先将原来的链接备份,输入:mv /usr/bin/python /usr/bin/python.bak
然后更改软连接,输入:ln -snf /usr/local/yzsoftware/python/bin/python3 usr/bin/python
执行完成后再次输入:ll /usr/bin |grep python,查看Python指向是否正确
输入python,显示Python 3.8.0,则软连接已正确更改
2)若不存在软连接,则直接输入:ln -s /usr/local/yzsoftware/python/bin/python3 usr/bin/python
执行完成后验证过程同上
标签:bin,yzsoftware,python,yz,usr,local,输入 From: https://www.cnblogs.com/looori/p/17116521.html