Reputation: 309
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.
ModuleNotFoundError:No modul named 'Cython'
Soluttion: pip install Cython
Error: command 'cl.exe' failed:No such file or directory
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.
Upvotes: 7
Views: 39369
Reputation: 23
Try this it will work
conda install -c conda-forge pycocotools
Upvotes: 0
Reputation: 51
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
Upvotes: 3
Reputation: 341
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.
Upvotes: 0
Reputation: 42757
If you don't mind using conda & pip together, this worked for me:
conda install Cython
pip install pycocotools
Upvotes: 1
Reputation: 131
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.
Upvotes: 9