python 2.7 - tensorflow no module named example.tutorials.mnist.input_data -
i've installed tensor flow on mac os x. ran simple command line test. trying first tutorial.
fail on 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 file seems 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 looks /library/python/2.7/site-packages/
not in list of paths python looking for.
to see paths python uses find packages, below ( can use command line ).
1. import sys
2. sys.path
( tells list of paths )
if /library/python/2.7/site-packages/
not in above list.
add follows:
in python file/script executing.
1. import sys
2. sys.path.append('/library/python/2.7/site-packages/')
Comments
Post a Comment