1.问题
在创建python环境的时候出现这个问题。有人说是conda版本太新?
环境:
ubuntu 20.04
Anaconda - Python 3.8
2.解决办法
1.修改~/.condarc
,两个都可以
清华源(优先支持ipv4)
auto_activate_base: false
ssl_verify: true
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: true
中科大源(建议使用,优先支持ipv6)
auto_activate_base: false
ssl_verify: true
channels:
- https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
show_channel_urls: true
channel_priority: flexible
2.清除缓存
conda clean -i
3.创建一个名为numpy
的python3.8
环境
conda create -n numpy python=3.8
conda config --set channel_priority flexible
6.conda env create -f pytorch17.yaml
使用这个简历环境,注意去除pytorch17.yaml中channel的部分。使用系统channel。
7.pytorch安装
conda添加清华的pytorch channel:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
https://blog.csdn.net/dou3516/article/details/107601256 ↩︎