安装特定的 PyTorch 版本(pytorch==1.0.1)
Install specific PyTorch version (pytorch==1.0.1)
我正在尝试在 conda 环境下安装特定的 PyTorch 版本:
使用 pip:
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
使用康达:
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.
我能够在 https://anaconda.org/soumith/pytorch 下找到这个版本,但是有没有办法找到它并从控制台安装?
你可以download/install你喜欢的官方版本Pytorch's Conda package。您指定的 link 是旧版本,不是 supported/updated 现在退出一段时间!
像这样安装你想要的版本:
conda install pytorch==1.0.1 torchvision==0.2.2 -c pytorch
如果您正在寻找 pip 版本,您也可以查看和访问来自 here 的所有版本。
然后简单地做:
pip install torch===1.0.1 -f https://download.pytorch.org/whl/torch_stable.html
您也可以随时在此处查看 previous versions。
您可以使用以下任一方法下载以前版本的 pytorch:
针对Linux/Windows具体OS
# CUDA 9.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=9.0 -c pytorch
# CUDA 10.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=10.0 -c pytorch
# CPU Only
conda install pytorch-cpu==1.0.1 torchvision-cpu==0.2.2 cpuonly -c pytorch
访问此 website 以查看如何在您的特定操作软件上安装 pytorch 版本。希望这个回答对您有所帮助。
我正在尝试在 conda 环境下安装特定的 PyTorch 版本:
使用 pip:
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
使用康达:
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.
我能够在 https://anaconda.org/soumith/pytorch 下找到这个版本,但是有没有办法找到它并从控制台安装?
你可以download/install你喜欢的官方版本Pytorch's Conda package。您指定的 link 是旧版本,不是 supported/updated 现在退出一段时间!
像这样安装你想要的版本:
conda install pytorch==1.0.1 torchvision==0.2.2 -c pytorch
如果您正在寻找 pip 版本,您也可以查看和访问来自 here 的所有版本。
然后简单地做:
pip install torch===1.0.1 -f https://download.pytorch.org/whl/torch_stable.html
您也可以随时在此处查看 previous versions。
您可以使用以下任一方法下载以前版本的 pytorch: 针对Linux/Windows具体OS
# CUDA 9.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=9.0 -c pytorch
# CUDA 10.0
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=10.0 -c pytorch
# CPU Only
conda install pytorch-cpu==1.0.1 torchvision-cpu==0.2.2 cpuonly -c pytorch
访问此 website 以查看如何在您的特定操作软件上安装 pytorch 版本。希望这个回答对您有所帮助。