Mac OS X上編譯TensorFlow

If you do need to build from the source, then these steps should work:python

  • brew install pythonlinux

  • virtualenv ~/tfgit

  • source ~/tf/bin/activategithub

  • Install bazel for Macui

  • Install PCRE (not PCRE2) for Maccode

  • Install SWIG for Macip

  • git clone --recurse-submodules https://github.com/tensorflow/tensorflowit

  • cd tensorflowpip

  • ./configuremodule

  • bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

  • bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

  • pip install /tmp/tensorflow_pkg/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

  • bazel build -c opt //tensorflow/cc:tutorials_example_trainer

相關文章
相關標籤/搜索