使用到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. 測試結果: