我正在关注 Tensorflow for Poets 示例以了解图像分类,并且在按照说明运行此命令后,我在终端中遇到错误:
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/qaneuro/poeticFlow/tensorflow-for-poets-2/scripts/retrain.py", line 109, in <module>
import tensorflow as tf
ImportError: No module named tensorflow
我收到的错误是:
/Users/qaneuro/poeticFlow/tensorflow-for-poets-2
我运行pwd确认我在教程的下载文件夹中,它正确显示:
std::move
到目前为止,一切似乎都很好。非常感谢任何帮助或建议。
答案 0 :(得分:1)
这可能很明显,但您似乎没有安装TensorFlow。
可在此处找到相关说明:https://www.tensorflow.org/install/
对于非优化版本,通常只需运行pip install tensorflow
(但它不会使用GPU或某些CPU指令)