I am running tensorflow/g3doc/tutorials/mnist/fully_connected_feed.py
. I get:
hiro106@hiro106-virtual-machine:~$ python tensorflow/tensorflow/g3doc/tutorials/mnist/fully_connected_feed.py
Traceback (most recent call last):
File "tensorflow/tensorflow/g3doc/tutorials/mnist/fully_connected_feed.py", line 33, in
import tensorflow.python.platform
ImportError: No module named tensorflow.python.platform
试试这个,它对我有用:
sudo pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
Does import tensorflow
work in a Python shell?
If not, try reinstalling with pip install --upgrade --force-reinstall <package>
.
For example, for TensorFlow version 1.12 with GPU support: pip install --upgrade --force-reinstall tensorflow-gpu==1.12.0
This helped me.
PYTHONPATH="${PYTHONPATH}:/usr/local/lib/python2.7/dist-packages/"
export PYTHONPATH
Make sure to check your path with this: echo $PYTHONPATH
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.