Flask/Keras webservice ModuleNotFoundError: No module named 'tensorflow_core.keras'
I don't consider this to be a solution but Setting flask_debug=1
(off) will allow you to continue working but you will need to restart the server after every change.
The issue is being tracked in TensorFlow Repo at the link below.
ModuleNotFoundError: No module named 'tensorflow_core.keras' in Flask
A Workaround that Works perfectly for Flask==1.1.1 and tensorflow==2.1.0
In Flask you should put "import tensorflow as tf
" in the "__init__.py
" file.
In Django you should put "import tensorflow as tf
" in the "manage.py
" file.