当前位置:   article > 正文

ERROR: No matching distribution found for torch==XXX

no matching distribution found for torch

问题描述

在跑论文里的一个代码时,需要根据requirements.txt下载依赖包,在安装到 pytorch 0.4.1时, 报No matching distribution found for torch==0.4.1 (from -r requirements.txt (line 6))的错误,如下图:
requirements.txt:
在这里插入图片描述
报错截图:
在这里插入图片描述

解决办法

不用 requirements.txt 文件,直接使用pip从pytorch的官网下载:

pip install torch==1.2.0 -f https://download.pytorch.org/whl/torch_stable.html
  • 1

如下图所示,成功下载:
在这里插入图片描述
此时,只需要从 requirements.txt 中把pytorch的一行注释掉,就可以正常下载其他的了。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


参考资料

[1] https://www.jianshu.com/p/f54a01419330?utm_campaign=haruki

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/756306
推荐阅读
相关标签
  

闽ICP备14008679号