我打算在虚拟环境中安装火炬。
所以我命令 !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/