参考链接:
https://github.com/philferriere/cocoapi
安装VS2015 Build Tools
点解下面的链接下载setup.exe,然后安装。安装完重启。
https://go.microsoft.com/fwlink/?LinkId=691126
编译安装
首先尝试如下命令:
pip3 install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
如果能顺利地从github上下载到源码,基本可以直接编译成功。如果不行,则手动下载源码,解压之后进入PythonAPI这个子目录,然后按住Shift+右键单击进入PowerShell,输入如下命令:
# 进入cmd环境
cmd
# 确认python版本
python -V
# 安装Cython
pip3 install Cython
# 编译
python3 setup.py build
# 安装
python3 setup.py install
另外,本文提供pycocotools的预编译包:百度云,提取码:4gp9。该包可使用的环境:Win10+Python 3.7,其他系统环境尚未测试。
234

被折叠的 条评论
为什么被折叠?



