Open shubhamsingh941889 opened 4 years ago
If you are working in Conda, you can follow the below steps to be able to install, import and use this library quite smoothly.
### Enter the below in your Conda Command Prompt ###
# Create a new environment
conda create -n <envName>
# Activate the environment
conda activate <envName>
# Install cython
pip install cython
# Install git
conda install -c anaconda git
# Install pycocotools from this GitHub rep
pip install git+https://github.com/philferriere/cocoapi.git#egg=pycocotools^&subdirectory=PythonAPI
Additionally, I have recently written an entire post on exploring and manipulating the COCO dataset. Do have a look.
@shubhamsingh941889 did you manage to fix this issue?
This worked for me pip install pycocotools-windows
@pdollar I could build binaries for all operating systems and ask the @dev-team to publish them in the new version. Then building from scratch would no longer be needed, and it should just work as it does for the other operating systems. Would that be of interest to you? I could make a github actions workflow that does all this and then for all future versions you can just use the artifacts (binaries) produced by the workflow.
EDIT: I setup a simple workflow. Had to modify the source code slightly, similar as done in pycocotools-windows. However, I made the setup.py more generic to be used for all operating systems dynamically. No need to have two separate projects for Windows and Linux/macOS.
The workflow produces an artifact which contains the binaries as python wheels (.whl) - see here. In addition, I made a pre-release here, where you can download and test the binaries if you would like.
I believe having these binaries within the PyPI would be great, as it totally removes the need to build the package from scratch when installing, independent of OS.
Seems like a cool idea, thanks @andreped . However, I'm no longer maintaining this repo in any way. Maybe @tylin could help? Thanks!
@tylin I could make a PR and you can come with any suggestions for improvement, if you'd like (if this is at all relevant) :]
TLDR: This enables seemless install on all operating systems, completely removing the need for VS Build Tools when installing pycocotools on windows (relevant for Python). I could set the workflow up such that the generated artifact is made ready for publication on PyPI directly.
@andreped please make wheel for python 3.10. Thanks.
@andreped please make wheel for python 3.10. Thanks.
@TomskDiver Here you go: https://github.com/andreped/cocoapi/releases/tag/v2.0
I built and released binaries for Python 3.6-3.11 and Win/Ubuntu/macOS.
Hope it helps! Let me know if there are any issues :]
@andreped thanks. I try your build in Windows 11 (21H2) and Python 3.10.8 and latest TensorFlow Object Detection API. Tests work fine:
Ran 24 tests in 111.347s
OK (skipped=1)
Even though I already downloaded Microsoft Visual C++ 14.0 the issue persists