tensorflow构建错误与bazel [英] tensorflow build error with bazel

查看:144
本文介绍了tensorflow构建错误与bazel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用python2.7在没有GPU的Ubuntu14.04上从源代码构建tensorflow.当我在控制台上执行 bazel build -c opt//tensorflow/tools/pip_package:build_pip_package 时,它说:

i'm trying to build tensorflow from source on Ubuntu14.04 with python2.7, no GPU. when i execute bazel build -c opt //tensorflow/tools/pip_package:build_pip_package on console, it says:

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.

我对bazel并不熟悉,并且不太了解该错误.的确,我在127.0.0.1:8123上使用了polipo和global proxy.但是我不明白为什么以及如何影响淡褐色.我也尝试停止polipo并禁止使用全球代理.然后git克隆一个新的tensorflow副本并再次进行构建.但仍然存在相同的错误.有人知道原因吗?谢谢!

i'm not familiar with bazel and don't quite understand the error. it's true that i'm using polipo and global proxy on 127.0.0.1:8123. but i don't understand why and how this affects bazel. i also tried stop polipo and banned the global proxy. then git clone a fresh copy of tensorflow and do the build again. but the same error still exist. does anybody know the reason? thanks!

推荐答案

直到 18天前,因此尚未发布.您可以将HTTPS_PROXY环境变量设置为 https://127.0.0.1:8123 吗?

Bazel didn't handle proxies with a trailing slash up until 18 days ago, so it's not in a release yet. Can you set your HTTPS_PROXY environment variable to be https://127.0.0.1:8123, instead?

在重建之前,您可能必须进行 bazel clean --expunge ,我不确定代理URL是否已缓存.

You might have to do a bazel clean --expunge before rebuilding, I'm not sure if the proxy URL is cached.

这篇关于tensorflow构建错误与bazel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆