python - 当我运行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.
解决方案
我只需要添加一个 python 路径,这是唯一的问题
推荐阅读
- android - 打开下一堂课时出错
- java - 使用 ujmp 创建身份矩阵
- python - docker容器中的jupyterhub无法连接到外部目录
- acumatica - 如何将 acumatica msdl 文件添加到云?
- sql-server - 从开始时间获取每小时数据
- css - WordPress(标题/导航栏)上同一图像的不同背景位置以及如何使它们相同?
- javascript - javascript innerhtml 显示为文本
- python - 如何在目录中的多个文件名中查找和替换两个不同的字符串?
- sql - 动态 SQL 转换文本和图像
- syntax - <> 在飞镖类扩展后的含义