使用anaconda安装pytorch的清华镜像地址


1、安装anaconda:
国内镜像网址:https://mirror.tuna.tsinghua.edu.cn/help/anaconda/
下载对应系统对应python版本的anaconda版本(Linux的是.sh文件)
安装命令(要在非root下安装,否则找不到conda命令):bash Anaconda3-5.1.0-Linux-x86_64.sh
2、用anaconda安装pytorch
(1)设置conda的地址:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
注:要删除defaults:sudo gedit ~/.condarc,然后手动删除,保存文档。
(2)去pytorch官网查询对应安装命令(只CPU版)
网址:http://pytorch.org/

         conda install pytorch-cpu torchvision -c pytorch

(3)安装pytorch

         conda install pytorch-cpu torchvision -c pytorch

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM