【问题标题】:ERROR: Could not find a version that satisfies the requirement torch (from versions: none) ERROR: No matching distribution found for torch错误:找不到满足火炬要求的版本(来自版本:无)错误:找不到火炬的匹配分布
【发布时间】:2023-01-20 11:13:19
【问题描述】:

我尝试使用pip install torch 下载手电筒

我遇到了这个问题:

C:\Users\Ahmad Sadek>pip install torch
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch

【问题讨论】:

  • 请试试pip install -vvv torch看看它说了什么。

标签: python python-3.x pytorch torch


【解决方案1】:

如果您在 Windows 上使用高于 3.7 的 python 版本,则会发生这种情况。 PyTorch specifies on their website 不支持高于 3.7 的版本。使用 3.8 时,我的 Windows 机器上出现了这个错误。安装 3.7 并将其设置为默认 python 后,问题解决了。

【讨论】:

    【解决方案2】:

    3.10 尚未正式支持它。使用夜间构建:

    pip3 install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
    

    【讨论】:

    • 错误:由于 OSError 无法安装软件包:[Errno 2] 没有这样的文件或目录:'C:\Users\Ahmad Sadek\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310 \site-packages\caffe2\python\serialized_test\data\operator_test\collect_and_distribute_fpn_rpn_proposals_op_test.test_collect_and_dist.zip' 提示:此错误可能是由于此系统未启用 Windows 长路径支持而发生的。您可以在 pip.pypa.io/warnings/enable-long-paths 找到有关如何启用此功能的信息
    • @AhmadSadekAlbasatneh 你需要启用长路径,pip.pypa.io/warnings/enable-long-paths
    猜你喜欢
    • 1970-01-01
    • 2020-02-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-24
    • 1970-01-01
    • 2023-03-20
    相关资源
    最近更新 更多