我尽量让this example工作,但每次我尝试建立与巴泽尔我收到此错误信息的程序:巴泽尔没有找到tensorflow包C++代码示例
bazel build //code:label_image
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: /home/jonas/tensorflow/code/BUILD:12:1: no such package 'tensorflow': BUILD file not found on package path and referenced by '//code:label_image'.
ERROR: Analysis of target '//code:label_image' failed; build aborted.
INFO: Elapsed time: 1.261s
我救的确切源代码从github在一个名为code
的目录中。我通过pip:pip3 install --upgrade tensorflow
在(主动)虚拟环境中安装了tensorflow
。我使用arch linux。
为什么bazel找不到合适的包?我对bazel/tensorflow很陌生。这些软件包在哪里保存?我必须在某处明确指定它们吗?
我明白了,谢谢。从github下载完整的项目并在那里运行示例构建,还是需要事先构建一些东西才能使其工作? – Jonas
是的,如果您还没有,请按照自述文件中特定于Tensorflow的附加步骤下载模型定义。 – Jin