python3.7安装tensorflow import error dll load faild_TensorFlow代码运行报错:ImportError: DLL load failed with...
py3.7.4版本,其中的代码涉及到scikit learn,TensorFlow,keras, pandas ,numpy。----CPU环境其他包安装都正常,就是TensorFlow安装时折腾了点。。后面安装完毕后,运行代码,发现报错:ImportError: DLL load failed with error code 3221225501。---网搜了各种办法,把tf的版本降低到1.12
py3.7.4版本,其中的代码涉及到scikit learn,TensorFlow,keras, pandas ,numpy。----CPU环境
其他包安装都正常,就是TensorFlow安装时折腾了点。。后面安装完毕后,运行代码,发现报错:ImportError: DLL load failed with error code 3221225501。---网搜了各种办法,把tf的版本降低到1.12.0.也没法解决。
因为是要搭建环境,需要进行离线安装。tensorflow的包名是:
tensorflow-1.13.1-cp37-cp37m-win_amd64.whl,安装成功,但是运行代码报错。
后面改成:
tensorflow-1.12.0-cp37-cp37m-win_amd64.whl,安装成功,仍旧是同样问题。。求指点,该如何解决。。。最好不要让我降python的版本。。。
具体错误内容如下:
Traceback (most recent call last):
File "D:\python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", lin
e 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "D:\python\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal
.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "D:\python\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal
.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript
ion)
File "D:\python\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "D:\python\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed with error code 3221225501
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\python\Desktop\test.py", line 7, in
from keras.models import Sequential
File "D:\python\lib\site-packages\keras__init__.py", line 3, in
from . import utils
File "D:\python\lib\site-packages\keras\utils__init__.py", line 6, in
from . import conv_utils
File "D:\python\lib\site-packages\keras\utils\conv_utils.py", line 9, in
le>
from .. import backend as K
File "D:\python\lib\site-packages\keras\backend__init__.py", line 89, in
ule>
from .tensorflow_backend import *
File "D:\python\lib\site-packages\keras\backend\tensorflow_backend.py", line 5
, in
import tensorflow as tf
File "D:\python\lib\site-packages\tensorflow__init__.py", line 24, in
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-im
port
File "D:\python\lib\site-packages\tensorflow\python__init__.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File "D:\python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", lin
e 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "D:\python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", lin
e 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "D:\python\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal
.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "D:\python\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal
.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, descript
ion)
File "D:\python\lib\imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "D:\python\lib\imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: DLL load failed with error code 3221225501
Failed to load the native TensorFlow runtime.
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
更多推荐




所有评论(0)