Answer the question
In order to leave comments, you need to log in
What is the error when running Flask for TTS: AttributeError: module 'tensorflow.compat.v2' has no attribute '__internal__'?
Fixed one by setting tensorflow==2.3.1:
AttributeError: module 'keras.utils.generic_utils' has no attribute 'populate_dict_with_module_objects'
AttributeError: module 'tensorflow.compat.v2' has no attribute '__internal__'
File "C:\Users\max\PycharmProjects\pythonProject\venv\lib\site-packages\keras\__init__.py", line 20, in <module>
from . import initializers
File "C:\Users\max\PycharmProjects\pythonProject\venv\lib\site-packages\keras\initializers\__init__.py", line 124, in <module>
populate_deserializable_objects()
File "C:\Users\max\PycharmProjects\pythonProject\venv\lib\site-packages\keras\initializers\__init__.py", line 49, in populate_deserializable_objects
LOCAL.GENERATED_WITH_V2 = tf.__internal__.tf2.enabled()
AttributeError: module 'tensorflow.compat.v2' has no attribute '__internal__'
Answer the question
In order to leave comments, you need to log in
The usual reinstallation of the tensorflow package helped me :
pip3 install tensorflow --upgrade --force-reinstall
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question