tensorflow: Can't find tensorflow.examples.tutorial
System information
- Have I written custom code (as opposed to using a stock example script provided in TensorFlow): None
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04.3 LTS
- Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: None
- TensorFlow installed from (source or binary): Source
- TensorFlow version (use command below): v1.12.1-17556-g63c45aacf3 2.0.0
- Python version: Python 3.7.4
- Bazel version (if compiling from source):0.27.1
- GCC/Compiler version (if compiling from source):7.4.0
- CUDA/cuDNN version: V10.1.243
- GPU model and memory: GP107GL [Quadro P1000] – 4031MiB
Describe the current behavior
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow.examples'
As the error sugests, can’t find the module. Am I missing something while generating the wheel package from bazel?
Describe the expected behavior Is there in the source code repo, hence should work. No monkey-fixes please. I have tried local copying the directory, but then some other tensorflow module is missing (tensorflow.contrib and goes on).
Code to reproduce the issue
python -c 'from tensorflow.examples.tutorials import input_data'
Other info / logs
bazel build --verbose_failures --config=monolithic //tensorflow/tools/pip_package:build_pip_package
Command I used to create the wheel package from tensorflow source.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (6 by maintainers)
I’m using tensorflow-cpu==2.1.0 and I had the same issue
ModuleNotFoundError: No module named 'tensorflow.examples'
I solve this downloading manually the directory called “tutorials” from tensorflow repo https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/tutorials
and placed it in my virtual env directory
myenv\Lib\site-packages\tensorflow_core\examples\
after that it works fine
Thanks @oscar7692 worked for me as well that way. life saver.