theAIGuysCode / Object-Detection-API

Yolov3 Object Detection implemented as APIs, using TensorFlow and Flask
Apache License 2.0
341 stars 180 forks source link

ModuleNotFoundError: No module named 'tensorflow.keras' #34

Open harshdaveee opened 3 years ago

harshdaveee commented 3 years ago

from yolov3_tf2.models import YoloV3, YoloV3Tiny File "E:\OD-2\Object-Detection-API\yolov3_tf2\models.py", line 5, in from tensorflow.keras import Model ModuleNotFoundError: No module named 'tensorflow.keras'

prabalp commented 3 years ago

This is because

  1. you are using venv different from python 3.7(if using pip, make 3.7 virtual environment)
  2. The virtual environment is not activated (where all the modules are installed ), uses conda activate