close

[Solved] ModuleNotFoundError: No module named ‘object_detection’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ModuleNotFoundError: No module named ‘object_detection’ in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ModuleNotFoundError: No module named ‘object_detection’ Error Occurs?

Today I get the following error ModuleNotFoundError: No module named ‘object_detection’ in python.

How To Solve ModuleNotFoundError: No module named ‘object_detection’ Error ?

  1. How To Solve ModuleNotFoundError: No module named 'object_detection' Error ?

    To Solve ModuleNotFoundError: No module named 'object_detection' Error Cause of this error is installing object_detection library, So one of the solution which can work is running the below command inside models/research

  2. ModuleNotFoundError: No module named 'object_detection'

    To Solve ModuleNotFoundError: No module named 'object_detection' Error Cause of this error is installing object_detection library, So one of the solution which can work is running the below command inside models/research

Solution 1

Try install Tensorflow Object Detection Library Packaged

pip install tensorflow-object-detection-api

Solution 2

Cause of this error is installing object_detection library, So one of the solution which can work is running the below command inside models/research

    sudo python setup.py install

If such solution does not work, please execute the below command one by one in the directory models/research

    export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
    sudo python setup.py install

I hope this will work. I also faced the same problem while creating model from export_inference_graph.py. It worked for me.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read