Error when installing object detection API

Im following an example to test the objectdetection API on pretrained models

When i try to install the API with the following steps provided bellow, the an error that i cant find a solution online.Any suggestion on how t osolve this?

Install the Object Detection API

%%bash
cd models/research/
protoc object_detection/protos/*.proto --python_out=.
cp object_detection/packages/tf2/setup.py .
python -m pip install .

ERROR: Exception:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py”, line 165, in exc_logging_wrapper
status = run_func(*args)
File “/usr/lib/python3/dist-packages/pip/_internal/cli/req_command.py”, line 205, in wrapper
return func(self, options, args)
File “/usr/lib/python3/dist-packages/pip/_internal/commands/install.py”, line 389, in run
to_install = resolver.get_installation_order(requirement_set)
File “/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py”, line 188, in get_installation_order
weights = get_topological_weights(
File “/usr/lib/python3/dist-packages/pip/_internal/resolution/resolvelib/resolver.py”, line 276, in get_topological_weights
assert len(weights) == expected_node_count
AssertionError

Hi @Costa, I was able to execute the above commands in colab with out any error. please refer to this gist for working code example. Could you please let us know in which environment you are facing this error. Thank You.

Hi thks for the fast response. I’m trying to install it on my local machine. I successfully installed the nvidia packages, and a Conda environment with TensorFlow 2.15.0. python version is 3.10

Hi @Costa, I have tried to run the above commands in wsl environment and did not get any error.

Thank You.