I am trying to install COCOAPI for object detection. I have installed Microsoft visual c++ 2015. I executed following command
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
But I got following error
Collecting git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
Cloning https://github.com/philferriere/cocoapi.git to c:\users\talha\appdata\local\temp\pip-req-build-mrsjlt3h
Running command git clone --filter=blob:none --quiet https://github.com/philferriere/cocoapi.git 'C:\Users\talha\AppData\Local\Temp\pip-req-build-mrsjlt3h'
Resolved https://github.com/philferriere/cocoapi.git to commit 2929bd2ef6b451054755dfd7ceb09278f935f7ad
Preparing metadata (setup.py) ... done
Building wheels for collected packages: pycocotools
Building wheel for pycocotools (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
error: subprocess-exited-with-error
× python setup.py clean did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\talha\AppData\Local\Temp\pip-req-build-mrsjlt3h\PythonAPI\setup.py", line 25, in <module>
cythonize(ext_modules)
File "C:\Users\talha\miniconda3\lib\site-packages\Cython\Build\Dependencies.py", line 973, in cythonize
module_list, module_metadata = create_extension_list(
File "C:\Users\talha\miniconda3\lib\site-packages\Cython\Build\Dependencies.py", line 816, in create_extension_list
for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
File "C:\Users\talha\miniconda3\lib\site-packages\Cython\Build\Dependencies.py", line 114, in nonempty
raise ValueError(error_msg)
ValueError: 'pycocotools/_mask.pyx' doesn't match any files
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed cleaning build dir for pycocotools
Failed to build pycocotools
ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects
I am trying to install COCOAPI for object detection. I have installed Microsoft visual c++ 2015. I executed following command
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
But I got following errorWhat are possible solution?