1

Even though I have tensorflow installed in the venv at version 2.12.0 it kinda does not have tensorflow.python.keras.layers.preprocessing. I tried to install the object-detection API and I am still struggling to get it work. Here is what I got as an error message when I tried to run the test file python object_detection/builders/model_builder_tf2_test.py. The second photo shows you what I got when I tried to run the command python -m pip install .

Some stuff works but like I said I am not able to make the test file work.enter image description hereenter image description here

I already did install visual studio 2017 because I got an error that object detection needed that and I also did everything what was written in the installement guide here https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html#tf-models-install-coco

I tried that already the whole da so I would be really happy if somebody could help me:)

dracule22
  • 31
  • 3

1 Answers1

-1

You need update your TensorFlow -

pip install tensorflow==2.7.0

for gpu version -

pip install tensorflow-gpu==2.7.0 

Have a look at this post

You can also to this link for more details

Pravash Panigrahi
  • 701
  • 2
  • 7
  • 21
  • then I get an comment with ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0 (from versions: 2.12.0rc0, 2.12.0rc1, 2.12.0) ERROR: No matching distribution found for tensorflow==2.0.0 – dracule22 May 01 '23 at 15:42
  • thats because its more older version and its not supported. You can try installing version - `2.5.0`. I have also modified the Answer – Pravash Panigrahi May 01 '23 at 15:45
  • then I got this error message :/ ERROR: Could not find a version that satisfies the requirement tensorflow==2.5.0 (from versions: 2.12.0rc0, 2.12.0rc1, 2.12.0) – dracule22 May 01 '23 at 16:07
  • what is the python or pip version you are using ? – Pravash Panigrahi May 01 '23 at 16:19
  • I am using pip 23.1.2 and python 3.11 – dracule22 May 01 '23 at 16:20
  • Oh, tensorflow `2.5.0` is not compatible with these version. And from the documentation, it seems like `2.7.0` is the first version. try installing this version. – Pravash Panigrahi May 01 '23 at 16:21
  • here is the links - 1. https://github.com/tensorflow/tensorflow/releases/tag/v2.7.0. 2. https://www.tensorflow.org/install/source_windows#gpu – Pravash Panigrahi May 01 '23 at 16:24