Search code examples
tensorflowbazel

Tensorflow installation from source for tensorflow.examples.learn modules


The above said modules are not build into the site-packages. I am using Python3.5 for it, and followed all the steps for the building from the source, that are given on the website.

I did search on the Internet, but there is no apparent solution found.

The following is the configuration used during ./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

After which I proceed with the steps given in the following website: https://www.tensorflow.org/install/install_sources#ConfigureInstallation

I am using Ubuntu 16.04 LTS 64 bit.

There are no error messages, just the modules are not getting built for using! This: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/learn

I want to understand the text_classification code by running it, so I had to install tensorflow from source, but in the site-packages/tensorflow, these modules are not there.

I want to understand why such thing happened, even when I did the steps right.


Solution

  • It seems you only finished the configure step, but you didn't actually build anything yet. Try running e.g. bazel build //tensorflow/examples/learn:boston.