pip - 错误 : torch has an invalid wheel, 未找到 .dist-info 目录

标签 pip torch

我打算在虚拟环境中安装火炬。
所以我命令 !pip install torch,但有一个错误。

Collecting torch
    Using cached torch-1.7.0-cp37-cp37m-win_amd64.whl(184.0 MB)
ERROR: torch ahs an invalid wheel, .dist-info directory not found
How to fix ".dist-info directory not found" in my package?在这里,一个答案说删除 Appdata/Local/pip/Cache flder 是有效的。
我该怎么办?

最佳答案

时间过去了。但万一有人因为同样的问题碰巧在这篇文章上发帖,你可以尝试以下命令:
如果您不需要 CUDA 安装

pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
如果您需要 CUDA 安装
pip install torch===1.7.0 torchvision===0.8.1 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
更多关于CUDA版本的详情请访问官方website

关于pip - 错误 : torch has an invalid wheel, 未找到 .dist-info 目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65191751/

相关文章:

python - conda 环境中 conda 和 pip 安装的区别

python - 如何使用 pip 将 Python 包安装到我的 Divio Docker 项目中?

pytorch - 手电筒 C++ : API to check NAN

尝试通过 pip 安装 mysql-connector 的 Python 错误

Python3.6 ImportError : cannot import name 'main' after upgrading pip from 8. 1.1 到 19.0.1

python - 从 npm 命令激活虚拟环境不起作用

neural-network - 如何在torch中编写updateGradInput和accGradParameters?

lua - 在 Lua 中将二进制数据转换为 Torch 张量

lua - 如何在 Torch REPL 中更改工作目录

lua - 为 lua/torch 安装 hdf5、mattorch/matio