环境配置出现的小问题以及解决方案
- 1、WARNING: Ignoring invalid distribution -orch (d:\ruanjian\anaconda\b\lib\site-packages)
- 2、WARNING: Error parsing requirements for soupsieve: [Errno 2] No such file or directory:
- 3、运行YOLOv5出现报错找不到SPPF错误,进行解决AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from
- 4、AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'
- 5、The size of tensor a (80) must match the size of tensor b (56) at non-singleton dimension 3
这些问题均出现在在GitHub上下载配环境出现的问题,解决方案均在pycharm种的控制台进行输入命令行
1、WARNING: Ignoring invalid distribution -orch (d:\ruanjian\anaconda\b\lib\site-packages)
- 把目录文件夹下带有波浪号的文件删
WARNING: Ignoring invalid distribution -illow (c:\users\gslyz\appdata\local\programs\python\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -illow (c:\users\gslyz\appdata\local\programs\python\python39\lib\site-packages)
除
2、WARNING: Error parsing requirements for soupsieve: [Errno 2] No such file or directory:
- WARNING: Error parsing requirements for soupsieve: [Errno 2] No such file or directory: ‘d:\program files (x86)\anaconda\envs\pytorch\lib\site-packages\soupsieve-2.3.2.post1.dist-info\METADATA’
WARNING: Error parsing requirements for ipython-genutils: [Errno 2] No such file or directory: ‘d:\program files (x86)\anaconda\envs\pytorch\lib\site-packages\ipython_genutils-0.2.0.dist-info\METADAT
A’
解决方案:conda install ipython_genutils-0.2.0.dist-info然后提示这样的操作不对
出现下图所示:
我们只要点击这个圈红的框去搜索一下对应的命令即可
点击搜索进行到下一步
点击一下红色地方
选中一行在pycharm控制台安装即可
点到为止,没有出现错误喽!
接下来我要走了,再出现错误我再回来!
3、运行YOLOv5出现报错找不到SPPF错误,进行解决AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from
还是得回来了!
- 这个看了一个博主写的,我就不写了直接上链接:运行YOLOv5出现报错找不到SPPF错误,
4、AttributeError: ‘Upsample’ object has no attribute ‘recompute_scale_factor’
由于torch的版本原因造成的,可以降级安装Pytorch 1.10以下或者按照按下面步骤修改:
更改一下源程序代码
5、The size of tensor a (80) must match the size of tensor b (56) at non-singleton dimension 3