问题
C:\WINDOWS\system32>conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- torchvision==0.4.0
- pytorch==1.2.0
Current channels:
- https://conda.anaconda.org/pytorch/win-64
- https://conda.anaconda.org/pytorch/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/win-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/win-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
解决思路
对应的镜像源中没有一下对应包的版本,考虑不带版本
PackagesNotFoundError: The following packages are not available from current channels:
- torchvision==0.4.0
- pytorch==1.2.0
解决方法
conda install pytorch torchvision cuda100 -c pytorch
指定cuda版本,其他版本不指定
注释
我是根据此方法安装好pytorch,具体问题具体解决。