pytorch 下载Solving environment: failed
时间: 2024-01-28 07:05:24 浏览: 155
PyTorch模型到ONNX:跨平台模型部署的桥梁
在下载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
```
阅读全文