From da70b83f35f3e2d29a01b36ec865e76063588345 Mon Sep 17 00:00:00 2001 From: Androbin Date: Wed, 14 Jun 2017 15:26:49 +0200 Subject: Try both python and python3 Used `configure` script for reference --- tools/tf_env_collect.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/tf_env_collect.sh') diff --git a/tools/tf_env_collect.sh b/tools/tf_env_collect.sh index 3740ee41bb..b7b8c25ee4 100755 --- a/tools/tf_env_collect.sh +++ b/tools/tf_env_collect.sh @@ -19,6 +19,7 @@ set -u # Check for undefined variables echo "Collecting system information..." OUTPUT_FILE=tf_env.txt +python_bin_path=$(which python || which python3 || true) { echo @@ -55,7 +56,7 @@ OUTPUT_FILE=tf_env.txt echo echo '== check for virtualenv =========================================' - python -c "import sys;print(hasattr(sys, \"real_prefix\"))" + ${python_bin_path} -c "import sys;print(hasattr(sys, \"real_prefix\"))" echo echo '== tensorflow import ============================================' @@ -69,9 +70,9 @@ print("tf.COMPILER_VERSION = %s" % tf.GIT_VERSION) with tf.Session() as sess: print("Sanity check: %r" % sess.run(tf.constant([1,2,3])[:1])) EOF -python /tmp/check_tf.py 2>&1 >> ${OUTPUT_FILE} +${python_bin_path} /tmp/check_tf.py 2>&1 >> ${OUTPUT_FILE} -DEBUG_LD=libs python -c "import tensorflow" 2>>${OUTPUT_FILE} > /tmp/loadedlibs +DEBUG_LD=libs ${python_bin_path} -c "import tensorflow" 2>>${OUTPUT_FILE} > /tmp/loadedlibs { grep libcudnn.so /tmp/loadedlibs -- cgit v1.2.3