From 4b480b7fec9a349e99982820d4444aefc43729f2 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tensorflow_probability/python/__init__.py b/tensorflow_probability/python/__init__.py index d81375f6f4..dce1163150 100644 --- a/tensorflow_probability/python/__init__.py +++ b/tensorflow_probability/python/__init__.py @@ -83,7 +83,9 @@ 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 installing the ' + 'tensorflow-probability[tf] extra.\n\n') raise