TensorFlow in version 2.2 and tensorflow-probability cause runtime errors

Installing TensorFlow in version 2.2 together with tensorflow-probability cause runtime errors on imports.

Issue description

When TensorFlow in version 2.2 is installed together with tensorflow-probability the following import error is produced:

>>> import tensorflow_probability as tfp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/fabio/Downloads/tf-prob/.pyenv/lib64/python3.8/site-packages/tensorflow_probability/__init__.py", line 76, in <module>
    from tensorflow_probability.python import *  # pylint: disable=wildcard-import
  File "/home/fabio/Downloads/tf-prob/.pyenv/lib64/python3.8/site-packages/tensorflow_probability/python/__init__.py", line 24, in <module>
    from tensorflow_probability.python import experimental
  File "/home/fabio/Downloads/tf-prob/.pyenv/lib64/python3.8/site-packages/tensorflow_probability/python/experimental/__init__.py", line 34, in <module>
    from tensorflow_probability.python.experimental import auto_batching
  File "/home/fabio/Downloads/tf-prob/.pyenv/lib64/python3.8/site-packages/tensorflow_probability/python/experimental/auto_batching/__init__.py", line 24, in <module>
    from tensorflow_probability.python.experimental.auto_batching import frontend
  File "/home/fabio/Downloads/tf-prob/.pyenv/lib64/python3.8/site-packages/tensorflow_probability/python/experimental/auto_batching/frontend.py", line 45, in <module>
    from tensorflow.python.autograph.core import naming
ImportError: cannot import name 'naming' from 'tensorflow.python.autograph.core' (/home/fabio/Downloads/tf-prob/.pyenv/lib64/python3.8/site-packages/tensorflow/python/autograph/core/__init__.py)

Affected packages

Severity

Issue fix

Use older or newer version of TensorFlow.

Pipeline units

Recommendation types

All, except for latest:

See this document that describes recommendation types listed.

Issues associated