1

I've installed tensor flow on Mac OS X. Successfully ran simple command line test. Now trying the first tutorial.

Fail on the first python line:

[python prompt:] import tensorflow.examples.tutorials.mnist.input_data

Traceback (most recent call last): File "", line 1, in ImportError: No module named examples.tutorials.mnist.input_data

But the file seems to be there:

new-host-4:~ karlovitz$ ls /Library/Python/2.7/site-packages/tensorflow/examples/tutorials/mnist/ BUILD fully_connected_feed.py mnist.py mnist_with_summaries.py init.py input_data.py mnist_softmax.py

mkarlovitz
  • 11
  • 1
  • 3

1 Answers1

0

@mkarlovitz Looks like /Library/Python/2.7/site-packages/ is not in the list of paths python is looking for.

To see what paths are python uses to find packages, do the below ( you can use command line for this ).
1. import sys
2. sys.path ( This tells the list of Paths )

If the /Library/Python/2.7/site-packages/ is not in the above list.
Add it as follows:
In the Python file/script you are executing.
1. import sys
2. sys.path.append('/Library/Python/2.7/site-packages/')

Guy Coder
  • 24,501
  • 8
  • 71
  • 136