来自tensorflow.examples.learn模块的源的Tensorflow安装

时间:2017-07-21 10:28:44

标签: tensorflow bazel

上述模块未构建到site-packages中。我正在使用Python3.5,并在网站上提供了从源代码构建的所有步骤。

我在互联网上搜索过,但没有找到明显的解决方案。

以下是./configure期间使用的配置:

./configure
..................
You have bazel 0.5.2 installed.
Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3
Found possible Python library paths:
  /usr/lib/python3/dist-packages
  /usr/local/lib/python3.5/dist-packages
Please input the desired Python library path to use.  Default is [/usr/lib/python3/dist-packages]

Using python library path: /usr/lib/python3/dist-packages
Do you wish to build TensorFlow with MKL support? [y/N] y
MKL support will be enabled for TensorFlow
Do you wish to download MKL LIB from the web? [Y/n] Y
mklml_lnx_2018.0.20170425.tgz
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]: 
Do you wish to use jemalloc as the malloc implementation? [Y/n] y
jemalloc enabled
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] y
Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N] y
Hadoop File System support will be enabled for TensorFlow
Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N] y
XLA JIT support will be enabled for TensorFlow
Do you wish to build TensorFlow with VERBS support? [y/N] y
VERBS support will be enabled for TensorFlow
Do you wish to build TensorFlow with OpenCL support? [y/N] n
No OpenCL support will be enabled for TensorFlow
Do you wish to build TensorFlow with CUDA support? [y/N] n
No CUDA support will be enabled for TensorFlow
Do you wish to build TensorFlow with MPI support? [y/N] n
MPI support will not be enabled for TensorFlow
Configuration finished

之后,我继续执行以下网站中给出的步骤:https://www.tensorflow.org/install/install_sources#ConfigureInstallation

我使用的是Ubuntu 16.04 LTS 64位。

没有错误消息,只是模块没有构建使用!这:https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/learn

我想通过运行来理解text_classification代码,所以我不得不从源代码安装tensorflow,但是在site-packages / tensorflow中,这些模块不存在。

我想知道为什么会发生这样的事情,即使我做了正确的步骤。

1 个答案:

答案 0 :(得分:1)

您似乎只完成了配置步骤,但实际上您还没有构建任何内容。尝试运行例如bazel build //tensorflow/examples/learn:boston