当我由于硬件限制而被迫使用pytorch 1.3.1时,强制安装torchvision 0.4.2(ppc64le IBM)

问题描述 投票:0回答:1

我处于一个奇怪的场景,我被迫使用火炬

1.3.1
(由于硬件,请参阅:https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/康达/#/)。我从 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.


相关:

anaconda pytorch ibm-cloud conda ppc64le
1个回答
1
投票

有关所有详细信息,请检查 (https://github.com/IBM/powerai/issues/268)。

确保您预先添加了正确的 conda 通道:

conda config --prepend channels https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/#/

然后安装您想要的 powerai wmlce,例如1.7.0(撰写本文时最新版本):

conda create -n my_new_env python=3.7 powerai=1.7.0
conda activate my_new_env
© www.soinside.com 2019 - 2024. All rights reserved.