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. 測試結果:
在這裏插入圖片描述

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