首页 > 技术文章 > ModuleNotFoundError: No module named 'pycocotools'解决办法

dyc99 2020-04-22 13:38 原文

概要:

  • 由于缺少pycocotools包引发的错误,而pycocotools包需要cython和C编译器,所以在安装cython之前需要先安装Cython。

解决办法:

  • 安装cython
    pip install -U cython
  • Linux安装pycocotools
    pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"
  • Windows安装pycocotools
    pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI"

     

推荐阅读