【问题标题】:How to install torch==0.3.1 in python=3.6如何在python=3.6中安装torch==0.3.1
【发布时间】:2019-10-04 12:01:11
【问题描述】:

我正在尝试在 python 3.6 中安装 deepmatcher 包。要让这个包在 python 中运行,你需要一个 torch==0.3.1 版本。所以我试图通过运行安装torch==0.3.1

pip install torch==0.3.1 

安装时出错:

收集火炬==0.3.1
错误:找不到满足要求的版本 torch==0.3.1(来自版本:0.1.2、0.1.2.post1)
错误:没有找到匹配的分布为 torch==0.3.1

我什至尝试使用“peterjc123”软件包安装它,但仍然无法卸载它。

【问题讨论】:

    标签: python-3.x pip installation version


    【解决方案1】:

    torch 0.3.1 不再是官方列表。要安装torch 0.3.1,可以通过源代码构建它,也可以使用特定版本的whl 文件。

    使用 whl 文件

    whl文件可以在pytorch提供的here找到

    然后可以使用pip install [path to downloaded file]安装下载的文件


    按源构建

    要通过源代码构建torch,可以通过git查看所需的版本

    git checkout v[version number]

    对于torch==0.3.1,这将是git checkout v0.3.1

    之后按照 README.md 提供的安装说明进行操作


    更多信息请访问:https://pytorch.org/get-started/previous-versions/

    【讨论】:

    • 我可以为 python3.7 做这个吗?每个 whl 文件都表示此平台不支持它。
    【解决方案2】:

    检查您是否为您的操作系统架构安装了正确的 python 或 使用 conda 创建一个虚拟环境,然后尝试以这种方式更好地安装它

    【讨论】:

      猜你喜欢
      • 2020-07-11
      • 1970-01-01
      • 1970-01-01
      • 2017-09-04
      • 1970-01-01
      • 1970-01-01
      • 2017-11-21
      • 2017-11-13
      • 2017-04-15
      相关资源
      最近更新 更多