Mac 安装pytorch遇到的问题详解
使用命令
conda install pytorch torchvision -c pytorch
因为是官方下载,安装会很慢
使用清华镜像会快很多
在终端输入命令
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
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
使用命令
conda install pytorch torchvision -c pytorch
会出现“CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://repo.anaconda.com/pkgs/main/osx-64/repodata.json”错误
使用
conda config --remove-defaults
再使用命令
conda install pytorch torchvision