How to Install pycocotools through Conda

Noodles picture Noodles · Feb 12, 2020 · Viewed 23.1k times · Source
  • Enviroment

OS:windows 7

Python:Python 3.7.3

Conda:conda 4.8.2

Step1: download soucre code of pococtools from github with linker fellowing: https://github.com/philferriere/cocoapi

Step2: build & install pococotall package by running

python setup.py build_ext --inplace,

python setup.py build_ext install 

sequently.

  1. ModuleNotFoundError:No modul named 'Cython' enter image description here

    Soluttion: pip install Cython

  2. Error: command 'cl.exe' failed:No such file or directory enter image description here

    Solution: install Visual Studio 2019 and ensure install 'Desktop development with c++' enviroment.

After deal with all probelem,you can run the two instrustion to finish the installment.You can run

conda list

and then check pycocotools. enter image description here

enter image description here

Answer

Akash Prabhu picture Akash Prabhu · Sep 29, 2020

This worked for me:

pip install pycocotools-windows