window下安装pycocotools出现ERROR: Command errored out with exit status 1:等问题

使用到ultralytics-yolov3模型时,不可避免的需要安装所需第三方软件包,其中有个pycocotools包及其难装。windows下安装pycocotools包时,遇到了一大堆坑,这篇文章希望能让大家少走一点弯路。可能pycocotools作者压根就没想过windows版本,也没考虑过我们这些穷逼学生。。狗头保命.jpg。。。

  • bug:在这里插入图片描述
    2. 如何在window条件下安装:

2. 1下载:

https://github.com/philferriere/cocoapi下载源码,下载位置任意,并进行解压。打开 conda prompt 终端,并切换到 cocoapi\PythonAPI目录下:在这里插入图片描述

2. 2 运行指令:

# install pycocotools locally (先这一条,结束后再下一条)
python setup.py build_ext --inplace

# install pycocotools to the Python site-packages
python setup.py build_ext install

成功后,会输出命令行:
在这里插入图片描述
在这里插入图片描述
3. 测试结果:
在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章