安装pycocotools时,首先遇到的是错误1,经过一番折腾终于解决。但又出现错误2,唉接着解决。。。

在windows下可能会出现以下错误:

错误1:

window10环境下安装pycocotools报错及解决办法

解决办法:

因为没有Visual C++ 编译环境。解决方式:
安装Build Tools for Visual Studio 2017 (2015版及以后就行,不需要安装整个vs)

window10环境下安装pycocotools报错及解决办法

安装过程我都选择了默认安装,安装成功,问题解决。

错误2:

cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for pycocotools

解决办法:

pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

即可安装成功。

 

相关文章:

  • 2021-05-07
  • 2021-05-08
  • 2021-11-15
  • 2021-08-09
  • 2021-06-30
  • 2021-06-28
  • 2022-03-03
  • 2022-12-23
猜你喜欢
  • 2021-08-16
  • 2021-10-12
  • 2021-07-25
  • 2021-06-27
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案