如果我被迫使用torch,我处于一个奇怪的场景中1.3.1
(由于硬件,请参阅:https ://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/#/ ) . 我从 pytorch 文档中读到它的对应版本的 torchvision 是0.4.1
(https://pypi.org/project/torchvision/):
安装
我们推荐 Anaconda 作为 Python 包管理系统。PyTorch(火炬)安装的详细信息请参考pytorch.org。以下是对应的torchvision版本和支持的Python版本。
Installation We recommend Anaconda as Python package management system. Please refer to pytorch.org for the detail of PyTorch (torch) installation. The following is the corresponding torchvision versions and supported Python versions. torch torchvision python master / nightly master / nightly >=3.6 1.5.0 0.6.0 >=3.5 1.4.0 0.5.0 ==2.7, >=3.5, <=3.8 1.3.1 0.4.2 ==2.7, >=3.5, <=3.7 1.3.0 0.4.1 ==2.7, >=3.5, <=3.7 1.2.0 0.4.0 ==2.7, >=3.5, <=3.7 1.1.0 0.3.0 ==2.7, >=3.5, <=3.7 <=1.0.1 0.2.2 ==2.7, >=3.5, <=3.7
但由于某种原因,我的版本错误:
torchvision 0.2.2 pypi_0 pypi
有没有办法安装正确版本的torchvision?
我试过的:
首先,我尝试使用 conda 强制安装正确的版本。Conda 找不到我需要的 torchvision 版本:
$ conda install torchvision==0.4.2
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.2
Current channels:
- https://repo.anaconda.com/pkgs/main/linux-ppc64le
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-ppc64le
- 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.
然后我继续尝试安装它,不管 pip
$ pip install torchvision==0.4.2
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement torchvision==0.4.2 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3)
ERROR: No matching distribution found for torchvision==0.4.2
也有错误。
还有什么可以尝试的吗?
我试过但失败了:
conda install torchvision==0.4.2 -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.2
Current channels:
- https://conda.anaconda.org/pytorch/linux-ppc64le
- https://conda.anaconda.org/pytorch/noarch
- https://repo.anaconda.com/pkgs/main/linux-ppc64le
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-ppc64le
- 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.
有关的:
- crossposted SO:由于硬件限制(ppc64le IBM),当我被迫使用pytorch 1.3.1时强制安装torchvision 0.4.2
- 交叉发布 pytorch 论坛:https ://discuss.pytorch.org/t/force-installing-torchvision/97279
- 交叉发布的 reddit pytorch:https ://www.reddit.com/r/pytorch/comments/iyf2qn/force_installing_torchvision/
- 交叉发布的 reddit ibm:https ://www.reddit.com/r/IBM/comments/iyhzex/force_installing_torchvision_042_when_i_am_forced/
- 真正的问题是安装torchmeta:https ://github.com/tristandeleu/pytorch-meta/issues/95
- https://www.ibm.com/mysupport/s/forumsquestion?id=0D50z00006gaxV9CAI
- quora:https ://www.quora.com/unanswered/How-does-one-install-specific-Python-packages-in-Conda-from-IBM-architectures
- reddit ibm2:https ://www.reddit.com/r/newIBM/comments/iyij10/force_installing_torchvision_042_when_i_am_forced/
- ibm 的 gitissue:https ://github.com/IBM/powerai/issues/268 pytorch 中的 gitissue