本身COCO的 pycocotools是不支持windows安装的,然而,抵不过国内各路大神的操作~~~
1. 激活pytorch,先安装bulid tools for VS2015,否则会安装失败,参考了https://blog.csdn.net/zgcr654321/article/details/85177874;
2. C:\Users\Administrator\Anaconda3\envs\pytorch\Lib\site-packages\pip\compat里__init__.py文件的第75行,把utf-8改为gbk;
3. activate pytorch, 输入python -m pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI。
附加链接:https://github.com/philferriere/cocoapi