diff options
Diffstat (limited to 'tensorflow/python/platform/self_check.py')
-rw-r--r-- | tensorflow/python/platform/self_check.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tensorflow/python/platform/self_check.py b/tensorflow/python/platform/self_check.py index 39d38d7bbc..966a094e55 100644 --- a/tensorflow/python/platform/self_check.py +++ b/tensorflow/python/platform/self_check.py @@ -21,7 +21,13 @@ from __future__ import print_function import os -from tensorflow.python.platform import build_info +try: + from tensorflow.python.platform import build_info +except ImportError: + raise ImportError("Could not import tensorflow. Do not import tensorflow " + "from its source directory; change directory to outside " + "the TensorFlow source tree, and relaunch your Python " + "interpreter from there.") def preload_check(): |