ImportError: No module named absl.testing
Asked Answered
E

2

6

I've been trying to run the Object detection API, at the point to test if the instalation worked:

python object_detection/builders/model_builder_test.py

I got the following error:

    File "object_detection/builders/model_builder_test.py", line 18, in <module>
    from absl.testing import parameterized
ImportError: No module named absl.testing

I couldn't find a solution anywhere. Already tried pip install absl-py and pip3 install absl-py but without success. Hope you could help me.

Eyre answered 2/11, 2018 at 19:3 Comment(1)
How did you install TF? Via pip3 install TF gpu!? And which TF version do you have? Are you sure you every installation you did matches your python version?Canterbury
E
16

Got it working by using python3 object_detection/builders/model_builder_test.py instead of python object_detection/builders/model_builder_test.py. I forgot that I was using TF for python3.

Eyre answered 4/11, 2018 at 15:41 Comment(0)
L
3
  • First install absl-py by running command if you are using tensorflow with python3

    sudo pip3 install absl-py

    otherwise

    sudo pip install absl-py

  • After that run

    python3 object_detection/builders/model_builder_test.py

    Cheers, You done it !!

Leboff answered 15/11, 2018 at 12:46 Comment(1)
shouldn't pip install with sudoGrimsby

© 2022 - 2024 — McMap. All rights reserved.