您的位置:首页 > 其它

tensor flow在mac下的编译与安装

2016-06-07 15:17 211 查看


Mac OS X 安装


1:安装Bazel


1. Install Homebrew on Mac OS X (one time setup)


$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"[/code] 
2. Install Bazel using Homebrew


$ brew install bazel


Once installed, you can upgrade to newer version of Bazel with:

$ brew upgrade bazel


2:SWIG
http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz
$ ./configure
$ make
$ make install


3:

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


遇到问题:

ERROR: /Users/aiven/Works/openSource/deepLearning/tensorflow/tensorflow/core/distributed_runtime/rpc/BUILD:199:1: no such package '@grpc//': Error cloning repository: SSL peer shut down incorrectly caused by SSL peer shut down incorrectly caused by SSL peer
shut down incorrectly and referenced by '//tensorflow/core/distributed_runtime/rpc:grpc_master_service_impl'.

解决方法:

For git 1.6.1 or above you can use something similar to (modified to suit):
git submodule foreach git pull origin master


4:

bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: