在运行yolov5的5.0版本时会出现subprocess.CalledProcessError: Command 'pip install 'pycocotools>=2.0'' returned non-zero exit status 1.的错误。
看大多数解决方案是在安装pycocotools时又安装了C++等的东西,但是安装的文件很大,有什么解决办法呢?经过努力,发现安装pycocotools时只要在后面加上windows就可以了。命令为pip install pycocotools-windows。
之后运行train.py会出现subprocess.CalledProcessError: Command 'pip install 'pycocotools>=2.0'' returned non-zero exit status 1.的错误,此时只需要修改requirements.txt文件的pycocotools>=2.0修改为pycocotools-windows>=2.0
问题解决