安装特定的 PyTorch 版本 (pytorch==1.0.1)

mrg*_*oom 4 macos pip conda pytorch

我正在尝试在 conda env 下安装特定的 PyTorch 版本:

使用点:

pip3 install pytorch==1.0.1
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement pytorch==1.0.1 (from versions: 0.1.2, 1.0.2)
ERROR: No matching distribution found for pytorch==1.0.1
Run Code Online (Sandbox Code Playgroud)

使用康达:

conda install pytorch==1.0.1
    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:
    
      - pytorch==1.0.1
    
    Current channels:
    
      - https://repo.anaconda.com/pkgs/main/osx-64
      - https://repo.anaconda.com/pkgs/main/noarch
      - https://repo.anaconda.com/pkgs/r/osx-64
      - 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.
Run Code Online (Sandbox Code Playgroud)

我能够在https://anaconda.org/soumith/pytorch下找到这个版本,但是有没有办法找到它并从控制台安装?

Rik*_*ika 9

您可以从官方Pytorch 的 Conda 包下载/安装您喜欢的版本。您指定的链接是旧版本,不支持/更新,现在退出一段时间!。
像这样安装你想要的版本:

conda install pytorch==1.0.1 torchvision==0.2.2 -c pytorch
Run Code Online (Sandbox Code Playgroud)

如果您正在寻找 pip 版本,您也可以从此处查看和访问所有版本。

并简单地执行以下操作:

pip install torch===1.0.1 -f https://download.pytorch.org/whl/torch_stable.html
Run Code Online (Sandbox Code Playgroud)

您也可以随时在此处查看以前的版本。