Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to install cocoapi for object detection. #652

Open
ansariahmad opened this issue Jul 16, 2023 · 3 comments
Open

Failed to install cocoapi for object detection. #652

ansariahmad opened this issue Jul 16, 2023 · 3 comments

Comments

@ansariahmad
Copy link

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

What are possible solution?

@Yummybiu
Copy link

same problem ..

@bajiluka
Copy link

seems not solved....

@alisha143
Copy link

same but not solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants