L
L
LakeForest2021-05-23 21:07:32
Python
LakeForest, 2021-05-23 21:07:32

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'

Now something else:
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

1 answer(s)
J
jisam27275, 2021-05-23
@jisam27275

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 question

Ask a Question

731 491 924 answers to any question