之前在ubuntu上安装pycocotools极其方便,今天尝试在window是上跑一下 detectron2项目,发现需要安装pycocotools,安装方法如下:
1、windows安装需要提前安装好C++环境,下载 VS2019, 勾选C++桌面开发 2、下载pycocotools安装文件,[https://github.com/cocodataset/cocoapi](https://github.com/cocodataset/cocoapi)
注意事项: 将setup.py文件的如下红框删除
解压之后,拷贝到python安装路径下的 site-packages文件夹中并 cmd到\PythonAPI目录下,执行如下两个脚本:
#install pycocotools locally (先这一条,结束后再下一条)
python setup.py build_ext --inplace
#install pycocotools to the Python site-packages
python setup.py build_ext install
第二个指令安装完之后,显示如下
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)