Created
April 11, 2018 08:21
-
-
Save yoavram/67ab1e9d6f891609d4e9f50ceff3454c to your computer and use it in GitHub Desktop.
Build TensorFlow on MacOS as of Dec 21 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.tensorflow.org/install/install_sources | |
brew install bazel | |
conda create -n tensorflow python six numpy wheel -y | |
source activate tensorflow | |
git clone https://github.com/tensorflow/tensorflow | |
cd tensorflow | |
./configure | |
# I chose "no" for everything except for "XLA/JIT" | |
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package | |
# if it fails you can try running ./configure again with different choices | |
bazel-bin/tensorflow/tools/pip_package/build_pip_package . | |
python -m pip install tensorflow-1.4.0-cp36-cp36m-macosx_10_9_x86_64.whl | |
cd .. # you have to leave the tensorflow repo folder before importing it | |
python -c "import tensorflow as tf;print(tf.Session().run(tf.constant('Hello, World!')))" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment