ModuleNotFoundError: No module named 'tensorflow.examples'

alwayscurious picture alwayscurious · May 13, 2018 · Viewed 34.3k times · Source

When I import tensorflow

import tensorflow as tf

I don't get an error. However, I do get the error below. I'm using spyder if that helps.

As per other questions, I ensured up to date (v1.8) tensorflow using both conda and then pip installs. This didn't resolve the issue. Please assist.

import tensorflow.examples.tutorials.mnist.input_data as input_data

ModuleNotFoundError: No module named 'tensorflow.examples'

Answer

Ibrahim COBANI picture Ibrahim COBANI · Nov 28, 2019

I think you should use like bellow on tensorflow 2

import tensorflow_datasets
mnist = tensorflow_datasets.load('mnist')