如何修复Importerror:tensorflow的DLL加载失败?

时间:2020-03-17 09:53:53

标签: python tensorflow anaconda

我的系统配置:-

Windows 10 ,64 bit
CPU = INTEL Xeon Platinum 8180 
AVX enabled
Anaconda 4.3.0 (64-bit)
Python 3.6

PIP安装tensorflow:-成功完成 但是在导入它时会失败并出现错误

>>> import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:User\ML\NN-Enabled-Chatbot\chatbot\lib\site-packages\tensorflow\__init__.py", line 98, in 
<module>
from tensorflow_core import *
File "C:User\ML\NN-Enabled-Chatbot\chatbot\lib\site-packages\tensorflow_core\__init__.py", line 
40, in 
<module>
from tensorflow.python.tools import module_util as _module_util
File "C:\Users\ML\NN-Enabled-Chatbot\chatbot\lib\site-packages\tensorflow\__init__.py", line 50, 
 in __getattr__
module = self._load()
 File "C:\Users\ML\NN-Enabled-Chatbot\chatbot\lib\site-packages\tensorflow\__init__.py", line 44, 
 in _load
module = _importlib.import_module(self.__name__)
File "C:\Program Files\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\ML\NN-Enabled-Chatbot\chatbot\lib\site- 
packages\tensorflow_core\python\__init__.py", line 52, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "C:\Users\ML\NN-Enabled-Chatbot\chatbot\lib\site- 
packages\tensorflow_core\core\framework\graph_pb2.py", line 7, in <module>
from google.protobuf import descriptor as _descriptor
File "C:\Users\ML\NN-Enabled-Chatbot\chatbot\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.

我已经搜索了互联网,发现许多人的问题通过降级tensorflow版本得以解决。我也尝试过,但还是没有运气。我尝试使用tensorflow 1.14和tensorflow 2.0。

有人建议这可能是由于CPU不支持AVX,但我也检查了一下,并且我的CPU也支持AVX。

我会对此提出任何建议。

0 个答案:

没有答案