From b3a621dbe7158109f9810b38c0d0fdfd33c02d1b Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Sun, 10 Mar 2024 00:51:45 -0600 Subject: [PATCH] Recommend 'tensorflow-probability[tf]' extra on tf-keras import failure * In addition to recommending users install TensorFlow dependencies piecemeal, also recommend using the 'tf' extra to install all required dependencies to use tensorflow-probability with tensorflow. * Split this off from the rest of the error message as it is already too long. --- tensorflow_probability/python/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow_probability/python/__init__.py b/tensorflow_probability/python/__init__.py index d81375f6f4..75f91c6b0e 100644 --- a/tensorflow_probability/python/__init__.py +++ b/tensorflow_probability/python/__init__.py @@ -83,7 +83,8 @@ def _validate_tf_environment(package): 'installed by default when you install TensorFlow Probability. ' 'This is so that JAX-only users do not have to install TensorFlow ' 'or TF-Keras. To use TensorFlow Probability with TensorFlow, ' - 'please install the tf-keras or tf-keras-nightly package.\n\n') + 'please install the tf-keras or tf-keras-nightly package.\n' + 'This can be be done through the tensorflow-probability[tf] extra.\n\n') raise