tensor flow在mac下的编译与安装

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)"

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

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值