如何解决安装特定的PyTorch版本pytorch == 1.0.1
我正在尝试在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
使用Conda:
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下找到该版本,但是有没有办法从控制台找到并安装?
解决方法
您可以从官方Pytorch's Conda package下载/安装所需的版本。您指定的链接是旧版本,现在不支持/更新退出!!
像这样安装所需的版本:
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 特定操作系统
# 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 版本。我希望这个回答对您有所帮助。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。