Skip to content

Error installing TensorFlow Object Detection API in Google Colab #11085

Open
@eldivategar

Description

@eldivategar

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • I checked to make sure that this issue has not already been filed.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/blob/master/research/object_detection/packages/tf2/setup.py

2. Describe the bug

I am experiencing an issue when trying to install the TensorFlow Object Detection API on TensorFlow 2. I am following the installation steps as mentioned in the documentation, but I encounter the following error:

%cd models/research

!protoc object_detection/protos/*.proto --python_out=.

!cp object_detection/packages/tf2/setup.py .
!python -m pip install .

The specific error message I am receiving is:

Collecting pyyaml<5.4.0,>=5.1 (from tf-models-official>=2.5.1->object-detection==0.1)
Using cached PyYAML-5.3.1.tar.gz (269 kB)
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

3. Steps to reproduce

  • Clone the TensorFlow Object Detection API repository.
  • Navigate to the models/research directory.
  • Execute the provided commands for installation.
  • Observe the error mentioned above.

4. Expected behavior

I expected the installation to complete successfully without any errors.

5. System information

  • OS Platform and Distribution (Google Colab):
  • Mobile device name if the issue happens on a mobile device: N/A
  • TensorFlow installed from (source or binary): Use Google Colab environment
  • TensorFlow version (use command below): 2.13.0 (as it's in a Google Colab environment)
  • Python version: 3.10.12
  • Bazel version (if compiling from source): N/A
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version: N/A
  • GPU model and memory: Tesla T4, 13gb ram (as it's in a Google Colab environment)

Metadata

Metadata

Assignees

Labels

models:researchmodels that come under research directorystaletype:bugBug in the code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions