首页 > 解决方案 > 当我运行classify_image.py时,Windows 10上没有名为tensorflow.python的模块

问题描述

我正在尝试使用 tensorflow 运行classify_image.py,但我不断收到相同的错误: Traceback (most recent call last): File "classify_image.py", line 46, in <module> import tensorflow as tf File "C:\Users\Diederik\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\__init__.py", line 22, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import ModuleNotFoundError: No module named 'tensorflow.python'

有人让我做一个 pip3 列表,所以我做了: C:\Users\Diederik\AppData\Local\Programs\Python\Python36\Scripts>pip3 list Package Version ----------- ------- absl-py 0.3.0 astor 0.7.1 gast 0.2.0 grpcio 1.13.0 Markdown 2.6.11 numpy 1.15.0 pip 10.0.1 protobuf 3.6.0 setuptools 39.0.1 six 1.11.0 tensorboard 1.9.0 tensorflow 1.9.0** termcolor 1.1.0 Werkzeug 0.14.1 wheel 0.31.1 You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

标签: pythontensorflowartificial-intelligenceimage-recognition

解决方案


我只需要添加一个 python 路径,这是唯一的问题


推荐阅读