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?
Asked
Active
Viewed 351 times
1

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 Answers
0
You can get TensorFlow in python package by:
- Directly doing pip install tensorflow: It will install the precompiled version by directly downloading a wheel file.
- Build from source code in GitHub using bazel build.
For the second approach, the following steps are needed:
- Take the source code from GitHub.
- Compile the code using bazel build. It will give the ".whl" file.
- Do pip install /tmp/TensorFlow-version-tags.whl
For detailed installation, steps follow this.

Yashi
- 11
- 3