ModuleNotFoundError: No module named 'pycocotools'解决办法

概要:

  • 由于缺少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"

猜你喜欢

转载自www.cnblogs.com/dyc99/p/12751535.html
今日推荐