error loading package '': Encountered error while reading extension file 'repositories/repositories

安装bazel 运行

bazel-bin/tensorflow/tools/graph_transforms/summarize_graph \
>   --in_graph=/tmp/inception_v3.pb

一直提示:error loading package '': Encountered error while reading extension file 'repositories/repositories.bzl': no such package '@io_bazel_rules_docker//repositories'报错

查看了网上的一些资料,让人抓狂,有的说bazel的配置高了,我换成bazel0.19版本,可是不行,通过conda install bazel安装的是最新版本,运行报错是版本太高,不符合tensorflow版本,查看了一下可以用bazel0.26的,所以又换了,还是爆出同样的错误,来回折腾了两天,要命啊,真的想放弃了,后来就瞎猫碰上死耗子了吧,反正都快要放弃了,就试试下面的安装方法

 wget https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-installer-linux-x86_64.sh .
 chmod +x ./bazel-0.29.1-installer-linux-x86_64.sh
 ./bazel-0.29.1-installer-linux-x86_64.sh --user

source /root/.bazel/bin/bazel-complete.bash

然后运行,居然通过了,我滴天,虽然还报一些其他的错误,但是这个问题解决了,而且运行

bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package.sh

编译成功了,我不知道是为什么,因为是水手,就是想吼····

你可能感兴趣的:(模型,加载)