centos7 安装python3,pip3,torch


yum安装Python3
yum install epel-release –y
yum install https://centos7.iuscommunity.org/ius-release.rpm -y
yum install python36 u –y
ln –s /bin/python3.6 /bin/python3

编译安装Python3
wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tgz
mkdir python3.6
cd python3.6
tar –zxvf Python-3.6.2.tgz

ls
centos7 安装python3,pip3,torch
cd python3.6.2
./configure
centos7 安装python3,pip3,torch
make

centos7 安装python3,pip3,torch
make install
ln –s /usr/local/bin/pip3.6 /bin/pip3 创建pip3的软链接
验证python3,pip3是否安装成功
centos7 安装python3,pip3,torch
卸载python3
rpm –qa|grep python3|xargs rpm –ev –allmatches –nodeps #卸载Python3
whereis python3 |xargs rm –frv删除所有残余文件,成功卸载
pip3的升级
pip3 install –upgrade pip
centos7 安装python3,pip3,torch
安装Torch
python3 –m pip install –upgrade torchvision –I https://pypi.tuna.tsinghua.edu.cn/simple

centos7 安装python3,pip3,torch

验证torch是否安装成功
centos7 安装python3,pip3,torch