由于硬件限制而被迫使用pytorch 1.3.1时,强制安装torchvision 0.4.2IBM ppp64le

问题描述

如果被迫使用手电筒1.3.1(由于硬件原因,请参见https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/#/),我处于一种奇怪的情况。我从pytorch文档中了解到,它对应的torchvision版本为0.4.1https://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.7
1.3.0 0.4.1   ==2.7,<=3.7
1.2.0 0.4.0   ==2.7,<=3.7
1.1.0 0.3.0   ==2.7,<=3.7
<=1.0.1   0.2.2   ==2.7,<=3.7

但是由于某种原因,我的版本不正确:

torchvision 0.2.2 pypi_0 pypi

有没有办法安装正确版本的Torchvision?


我尝试过的事情:

首先,我尝试使用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.


相关:

解决方法

有关所有详细信息,请检查(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

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...