我正在try 使用continuumio/miniconda3:4.12.0 Docker的图像获得pytorch==1.11.0
.
我先跑docker run -i -t continuumio/miniconda3 /bin/bash
米.然后,在容器中,我运行:conda search -c conda-forge pytorch==1.11.0
.以下是错误:
No match found for: pytorch==1.11.0. Search: *pytorch*==1.11.0
PackagesNotFoundError: The following packages are not available from current channels:
- pytorch==1.11.0
Current channels:
- https://conda.anaconda.org/conda-forge/linux-aarch64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/linux-aarch64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-aarch64
- https://repo.anaconda.com/pkgs/r/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.
然后我试了conda config --append channels conda-forge
次,然后又跑了conda search -c conda-forge pytorch==1.11.0
次.收到相同的错误.
为了测试网络连接,我运行了conda search pytorch
,因此它将搜索默认通道以查找任何pytorch包.它是成功的:
Loading channels: done
# Name Version Build Channel
pytorch 1.8.1 cpu_py37he9ab0f8_0 pkgs/main
pytorch 1.8.1 cpu_py38he9ab0f8_0 pkgs/main
pytorch 1.8.1 cpu_py39he9ab0f8_0 pkgs/main
pytorch 1.10.2 cpu_py310h65e219b_0 pkgs/main
pytorch 1.10.2 cpu_py37ha034a5a_0 pkgs/main
pytorch 1.10.2 cpu_py38ha034a5a_0 pkgs/main
pytorch 1.10.2 cpu_py39ha034a5a_0 pkgs/main
奇怪的是,当我在本地终端的容器外运行conda search -c conda-forge pytorch==1.11.0
时,它是可用的:
Loading channels: done
# Name Version Build Channel
pytorch 1.11.0 cpu_py310h61528c5_1 conda-forge
pytorch 1.11.0 cpu_py310h61528c5_2 conda-forge
pytorch 1.11.0 cpu_py310he9514b4_0 conda-forge
pytorch 1.11.0 cpu_py38h17550ec_1 conda-forge
pytorch 1.11.0 cpu_py38h17550ec_2 conda-forge
pytorch 1.11.0 cpu_py38h1b6422d_0 conda-forge
pytorch 1.11.0 cpu_py39h03f923b_1 conda-forge
pytorch 1.11.0 cpu_py39h03f923b_2 conda-forge
pytorch 1.11.0 cpu_py39h19aa3d3_0 conda-forge
为什么是这样的情况,我们如何解决它?