python - 导入 tensorflow 抛出导入错误: DLL load failed

标签 python tensorflow

我已经在 virtualenv 中安装了 tensorflow 以及常规系统安装,并将所有必需的目录添加到 Path 我正在使用 python 3.6.0 仅安装tensorflow cpu

import tensorflow as tf

抛出:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\env\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused- 
import
File "C:\env\lib\site-packages\tensorflow\python\__init__.py", line 59, in 
<module>
from tensorflow.core.framework.graph_pb2 import *
File "C:\env\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 
6, in <module>
from google.protobuf import descriptor as _descriptor
File "C:\env\lib\site-packages\google\protobuf\descriptor.py", line 47, in 
<module>
from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.

最佳答案

请将您的 Python 版本3.6.0 升级到 3.6.1 ,您的问题将会得到解决。

更多信息请引用Github Issue 1Github Issue 2

关于python - 导入 tensorflow 抛出导入错误: DLL load failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54166626/

相关文章:

python - 多类 Keras 感知器分类器将所有内容分类为单个类

python - bin() 可以像 Python 2.6 中的 oct() 和 hex() 那样重载吗?

python - pandas read_csv 节标志结束

tensorflow - MNIST 识别手写文字

debugging - Tensorboard Visual Debugger UnimplementedError 对象不可迭代

python - ValueError : labels shape must be [batch_size, labels_dimension], 得到 (128, 2)

python - 如何使用 CherryPy 进行 XMLRPC

python - 从pyqt中的框架中删除所有内容

python - 回调问题 FailedPreconditionError

python - TensorFlow:实现网络,其中所有一层的特征图未连接到下一层的所有特征图