Last answered:

21 Oct 2020

Posted on:

15 Oct 2020

0

says module not found,even after installing pips for tf and sklearn

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-917aabef6fe5> in <module>
      1 import numpy as np
      2 import tensorflow as tf
----> 3 from tensorflow.examples.tutorials.mnist import input_data
      4 
      5 # TensorFLow includes a data provider for MNIST that we'll use.

ModuleNotFoundError: No module named 'tensorflow.examples.tutorials'
1 answers ( 0 marked as helpful)
Instructor
Posted on:

21 Oct 2020

0
Hi nandish,  The issue might be caused due to a version of tensorflow. Apparently there is a problem with tensorflow v. 2. opening some example. What you could try is the following: Instead of
from tensorflow.examples.tutorials.mnist import input_data

try:
import tensorflow_datasets as tf
# Construct a tf.data.Dataset
dataset = tf.load(name="mnist", split=tf.Split.TRAIN)

Alternatively, you could try reverting to v.1 of tensorflow and see if that raises any issues.

Best,
365 Eli

Submit an answer