15

I am able to run the Deep MNIST Example fine, but when running fully_connected_feed.py, I am getting the following error:

File "fully_connected_feed.py", line 19, in <module>
from tensorflow.g3doc.tutorials.mnist import input_data ImportError: No module named
g3doc.tutorials.mnist

I am new to Python so could also just be a general setup problem.

Guy Coder
  • 24,501
  • 8
  • 71
  • 136
Marc Delingat
  • 153
  • 1
  • 1
  • 5
  • Can you try editing line 19 of `fully_connected_feed.py` to simply do `import input_data`? (You might need to do the same for `import mnist` on the following line as well.) This looks like an issue with the tutorial, which requires you to be in a particular path. Changing the import statements should fix it. – mrry Nov 11 '15 at 22:41
  • Thank you. That solved the problem :-) – Marc Delingat Nov 11 '15 at 23:35

2 Answers2

13

This is a Python path issue. Assuming that the directory tensorflow/g3doc/tutorials/mnist is your current working directory (or in your Python path), the easiest way to resolve it is to change the following lines in fully_connected_feed.py from:

from tensorflow.g3doc.tutorials.mnist import input_data
from tensorflow.g3doc.tutorials.mnist import mnist

...to:

import input_data
import mnist
mrry
  • 125,488
  • 26
  • 399
  • 400
1

Another alternative is to link the 'g3doc' directory from the github repo into the tensorflow python wheel folder. That way you don't need to change the code.

Barry Rogerson
  • 598
  • 2
  • 15