Windows10下Anaconda+pycocotools安装
本人环境:Win10+Anaconda+python3.7
做深度学习需要用到pycocotools包
pycocotools的安装分为两步:
一、安装git(如果之前没有安装过)
二、安装pycocotools
git的安装
链接
这里我就不赘述了,这个博主说的很详细!
安装完后重启
pycocotools安装
1、安装visualcppbuildtools_full.exe
链接
2、重启电脑,在开始菜单中打开"Visual C++ 2015 x64 Native Build Tools Command Prompt"命令行
安装时一直默认即可
3、命令行中键入"activate env_name"激活虚拟环境(env_name为虚拟环境名称)
4、命令行中键入
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
完成pycocotools安装。(git的下载也许会很慢,耐心等待)
若安装过程中出现:
原因是该conda环境未安装Cython这个模块,因为打开Github https://github.com/philferriere/cocoapi.git PythonAPI文件夹下的setup.py文件中有一句import Cython
因此需先安装Cython模块
conda install Cython
安装成功!