[英]tensorflow build error with bazel
i'm trying to build tensorflow from source on Ubuntu14.04 with python2.7, no GPU.我正在尝试使用 python2.7 在 Ubuntu14.04 上从源代码构建 tensorflow,没有 GPU。 when i execute bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
on console, it says:当我在控制台上执行bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
时,它说:
ERROR:
/home/yangyang/tensorflow/tensorflow/tensorflow/tools/pip_package/BUILD:23:1:
error loading package 'tensorflow/contrib/session_bundle': Encountered
error while reading extension file 'protobuf.bzl': no such package
'@protobuf//': Proxy address https://127.0.0.1:8123/ is not a valid
URL and referenced by
'//tensorflow/tools/pip_package:build_pip_package'.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build
aborted.
i'm not familiar with bazel and don't quite understand the error.我对 bazel 不熟悉,也不太明白这个错误。 it's true that i'm using polipo and global proxy on 127.0.0.1:8123.确实,我在 127.0.0.1:8123 上使用了 polipo 和全局代理。 but i don't understand why and how this affects bazel.但我不明白这为什么以及如何影响 bazel。 i also tried stop polipo and banned the global proxy.我还尝试停止 polipo 并禁止全局代理。 then git clone a fresh copy of tensorflow and do the build again.然后 git clone 一个新的 tensorflow 副本并再次构建。 but the same error still exist.但同样的错误仍然存在。 does anybody know the reason?有人知道原因吗? thanks!谢谢!
Bazel didn't handle proxies with a trailing slash up until 18 days ago , so it's not in a release yet. Bazel 直到18 天前才处理带有斜杠的代理,因此它还没有发布。 Can you set your HTTPS_PROXY environment variable to be https://127.0.0.1:8123
, instead?您可以将 HTTPS_PROXY 环境变量设置为https://127.0.0.1:8123
吗?
You might have to do a bazel clean --expunge
before rebuilding, I'm not sure if the proxy URL is cached.您可能需要在重建之前执行bazel clean --expunge
,我不确定代理 URL 是否已缓存。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.