Installation pycocotools

surroundings:

windows10x64, python 3.5.2, vs2013, alone vc ++ 2015 build tools installed.

Input pip install pycocotools python at the command line may be directly mounted on pycocotools 2.0, but this is illusion

Although you can import pycocotools, but an error occurs when importing pycocotools._mask, suggesting the absence of this module, you need to reinstall, but not by pip again to reload once, but according to online methods, to download the source code github above:

https://github.com/philferriere/cocoapi

Download to a local,

It should be noted:

Download and install the vc ++ 2015 build tools, and then modify the system default compiler environment, the arrow will be referred to the system environment variables in Microsoft Visual Studio 12.0 revised to Microsoft Visual Studio 14.0.

Because 12.0 corresponds vs2013, compiler can not be used, so to modify the corresponding vc ++ 2015 compiler environment just installed:

After you modify, and then open a command in pythonAPI this folder window, type python setup.py build_ext --inplace compile source code,

Then execute: python setup.py build_ext install

This will be compiled pycocotools mounted to the python corresponding sitepakages:

You can then import the pleasant:

Not being given, the installation was successful!

Guess you like

Origin blog.csdn.net/sinat_33486980/article/details/92840377
Recommended