pytorch 下载Solving environment: failed
时间: 2024-01-28 11:05:24 浏览: 158
PyTorch环境配置指南:基于Anaconda平台的技术步骤
在下载PyTorch时,如果出现Solving environment: failed的错误,可以尝试以下几种方法:
1.更新conda和清除缓存:
```shell
conda update conda
conda clean --all
```
2.更换conda源:
```shell
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
```
3.使用清华镜像安装pytorch:
```shell
conda install pytorch torchvision torchaudio -c pytorch -i https://pypi.tuna.tsinghua.edu.cn/simple
```
4.使用pip安装pytorch:
```shell
pip install torch torchvision torchaudio -i https://pypi.tuna.tsinghua.edu.cn/simple
```
阅读全文