How to Install pycocotools through Conda
Asked Answered
S

7

7
  • 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

Souter answered 12/2, 2020 at 13:53 Comment(0)
G
15

This worked for me:

pip install pycocotools-windows 
Goto answered 29/9, 2020 at 14:0 Comment(0)
U
9

I just went down this list until I found one that worked:

conda install -c conda-forge pycocotools
conda install -c conda-forge/label/gcc7 pycocotools
conda install -c conda-forge/label/cf201901 pycocotools
conda install -c conda-forge/label/cf202003 pycocotools

Annoyingly, it seems that for some setups pycocotools will install just fine. But then, when you want to import it, the script will freeze at the import step. In that case, just go down the list and try the next one.

The last one (and most recent) worked for me, so perhaps start there.

Unpaged answered 5/5, 2020 at 17:11 Comment(2)
This still doesn't work for me. I'm using the following on a Windows 10 64-bit environment: Conda 4.8.3 and Python 3.7.7Verdaverdant
Worked fine for me with mamba: mamba install -c conda-forge pycocotoolsSapwood
F
3

Following the same steps as specified here:

  • Install Visual C++ 2015 Build Tools from here with default selection.

  • Go to C:\Program Files (x86)\Microsoft Visual C++ Build Tools and run vcbuildtools_msbuild.bat

  • In Anaconda, run

  • pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI

Fulgurous answered 18/7, 2020 at 19:59 Comment(0)
C
1

If you don't mind using conda & pip together, this worked for me:

conda install Cython
pip install pycocotools
Cakewalk answered 9/6, 2020 at 17:37 Comment(0)
U
0

Conda seems to have issues with pycocotools installations ,official link dosent mention windows. You may want to look into this solution on github for pycoco installation on windows. Worked for me. Better to use the pypi for installation.

Uda answered 13/8, 2020 at 17:35 Comment(0)
F
0

This worked for me:

 pip install pycocotools-windows 
Fivespot answered 18/2, 2022 at 2:9 Comment(0)
M
0

Try this it will work

conda install -c conda-forge pycocotools

Mathamathe answered 10/6, 2023 at 11:43 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Hottentot

© 2022 - 2024 — McMap. All rights reserved.