tensorflow出现 ImportError: DLL load failed: 找不到指定的程序

问题描述

在pycharm中安装了tensorflow 1.8.0, 之后出现了如下问题:

Traceback (most recent call last):
File “D:/pyfile/word4/yy.py”, line 3, in
import tensorflow as tf
File “D:\pyfile\word4\venv\lib\site-packages\tensorflow__init__.py”, line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File “D:\pyfile\word4\venv\lib\site-packages\tensorflow\python__init__.py”, line 52, in
from tensorflow.core.framework.graph_pb2 import *
File “D:\pyfile\word4\venv\lib\site-packages\tensorflow\core\framework\graph_pb2.py”, line 6, in
from google.protobuf import descriptor as _descriptor
File “D:\pyfile\word4\venv\lib\site-packages\google\protobuf\descriptor.py”, line 47, in
from google.protobuf.pyext import _message
ImportError: DLL load failed: 找不到指定的程序。

解决办法

没有注意到protobuf已经更新。 在自动安装了tensorflow时, protobuf安装的是最新版本3.6.1, 出现了不兼容的问题。

更换为 protobuf 3.6.0即可

pip install protobuf==3.6.0

你可能感兴趣的:(tensorflow出现 ImportError: DLL load failed: 找不到指定的程序)