diff options
author | Androbin <robin.richtsfeld@gmail.com> | 2017-06-14 15:26:49 +0200 |
---|---|---|
committer | Martin Wicke <martin.wicke@gmail.com> | 2017-06-14 15:18:43 -0700 |
commit | da70b83f35f3e2d29a01b36ec865e76063588345 (patch) | |
tree | f8fd8b70f7f07f02f08148eb8541bf51403e5403 /tools/tf_env_collect.sh | |
parent | fa3884883d0a44c2289a7858734c8dabb979da96 (diff) |
Try both python and python3
Used `configure` script for reference
Diffstat (limited to 'tools/tf_env_collect.sh')
-rwxr-xr-x | tools/tf_env_collect.sh | 7 |
1 files changed, 4 insertions, 3 deletions
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 |