Skip to content
Permalink
Browse files

Add the option to configure with python3 (#646)

In macOS, catalina by default ships python 3.7 already (through XCode).
As such I expect many people to use python 3.7 with tensorflow.
For that I think it makes sense to allow configure with python3 thorough configure.sh

This PR add the optional argument for configure.sh to take python3 (instead of default python).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
  • Loading branch information
yongtang committed Nov 17, 2019
1 parent e75d306 commit 98b7375b4c67e9805a1ca9f1a974846ff4de671a
Showing with 9 additions and 3 deletions.
  1. +9 −3 configure.sh
@@ -15,9 +15,15 @@
# ==============================================================================

rm -f .bazelrc
if python -c "import tensorflow as tf" &> /dev/null; then

PYTHON=python
if [[ "$#" -gt 0 ]]; then
PYTHON=$1
fi

if $PYTHON -c "import tensorflow as tf" &> /dev/null; then
echo 'using installed tensorflow'
else
python -m pip install $(python setup.py --package-version)
$PYTHON -m pip install $(python setup.py --package-version)
fi
python third_party/tf/configure.py
$PYTHON third_party/tf/configure.py

0 comments on commit 98b7375

Please sign in to comment.
You can’t perform that action at this time.