欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

MacOS搭建深度学习环境遇到的坑

程序员文章站 2022-05-23 16:25:08
...

MacOS搭建深度学习环境遇到的坑
码:深度学习环境搭配指南
1、anaconda中配置OpenCV时,始终报错Multiple Errors Encountered
删除缓存的包: conda clean --packages --tarballs
2、pytorch
关于CondaHTTPError: HTTP 000 CONNECTION FAILED for url问题。
当在conda中添加镜像地址后

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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes#下载时显示文件来源

可通过打开 .condarc 文件查看已有镜像源:open .condarc
(defaults删不删无所谓,https也不用改)
MacOS搭建深度学习环境遇到的坑
官网下载时去掉-c后面部分,它指定默认地址下属路径,若不删掉,会从default地址找镜像源
如:conda install pytorch torchvision
MacOS搭建深度学习环境遇到的坑