1

I want to build tensorflow with python libraries. Currently I have tensorflow installed but I do not see python packages in /usr/local/lib/python3.6/dist-packages so when I try to import tensorflow module in python terminal, it fails. However, there is library in /usr/lib and C++ programs work. What is flag/target needed in bazel build?

debonair
  • 2,505
  • 4
  • 33
  • 73
  • Try this [stackoverflow](https://stackoverflow.com/questions/42244198/importerror-no-module-named-tensorflow) link. Maybe it will help – MockinJay Jun 16 '20 at 04:44

1 Answers1

0

You can get TensorFlow in python package by:

  1. Directly doing pip install tensorflow: It will install the precompiled version by directly downloading a wheel file.
  2. Build from source code in GitHub using bazel build.

For the second approach, the following steps are needed:

  1. Take the source code from GitHub.
  2. Compile the code using bazel build. It will give the ".whl" file.
  3. Do pip install /tmp/TensorFlow-version-tags.whl

For detailed installation, steps follow this.

Yashi
  • 11
  • 3