简体   繁体   English

导入错误:DLL 加载失败:找不到指定的模块。(Keras)

[英]ImportError: DLL load failed: The specified module could not be found.(Keras)

First I have created an environment in anaconda navigator in which i have installed packages like Keras,Tensorflow and Theano.首先,我在 anaconda navigator 中创建了一个环境,在其中安装了 Keras、Tensorflow 和 Theano 等软件包。

Now I have activated my environment through anaconda navigator and have launched the Spyder Application.现在我已经通过 anaconda navigator 激活了我的环境并启动了 Spyder 应用程序。 Now When i try to import keras it is showing error stating that:现在,当我尝试导入 keras 时,它显示错误,指出:

Traceback (most recent call last):
  File "C:\Users\Quickhotshot612\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\Users\Quickhotshot612\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\Users\Quickhotshot612\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "C:\Users\Quickhotshot612\Anaconda3\envs\tensorflow\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "C:\Users\Quickhotshot612\Anaconda3\envs\tensorflow\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: The specified module could not be found.

Failed to load the native TensorFlow runtime.无法加载本机 TensorFlow 运行时。

See https://www.tensorflow.org/install/errors请参阅https://www.tensorflow.org/install/errors

for some common reasons and solutions.出于一些常见的原因和解决方案。 Include the entire stack trace above this error message when asking for help.寻求帮助时,请在此错误消息上方包含整个堆栈跟踪。

And is continuously the showing the error like an infinite.并且不断地显示出无限大的错误。 Where did i go wrong?我哪里做错了? Anyone help me with this.任何人都可以帮我解决这个问题。 enter image description here在此处输入图片说明

But when i give (import theano),it is working,but does'nt in the case of tensorflow and keras.但是当我提供(导入 theano)时,它正在工作,但在 tensorflow 和 keras 的情况下却没有。

Yes,I kinda figured out and it works for me!是的,我有点想通了,它对我有用!

1)Check pip,setuptools and wheel are up to date. 1) 检查 pip、setuptools 和 wheel 是否是最新的。
2)If u get an error during installation with the wrapt library."conda remove wrapt" and then "pip install tensorflow" 2)如果你在安装 wrapt 库时遇到错误。“conda remove wrapt”然后“pip install tensorflow”
3)Also u should have the Microsoft Visual C++ Redistributable for Visual Stuido 2015 installed in your computer or a higher version. 3)此外,您还应该在您的计算机上安装 Microsoft Visual C++ Redistributable for Visual Stuido 2015 或更高版本。
4)Then try to import tensorflow or tensorflow.keras 4)然后尝试导入tensorflow或tensorflow.keras

If this still shows ImportError.如果这仍然显示 ImportError。 Open the navigator and and install tensorflow from there directly by selecting that environment and going to Not installed and then search for tensorflow and download the package.It will automatically add the package to your environment and open say spyder and try to import tensorflow in kernal.打开导航器并直接从那里安装 tensorflow,选择该环境并转到未安装,然后搜索 tensorflow 并下载包。它会自动将包添加到您的环境并打开 say spyder 并尝试在内核中导入 tensorflow。

This works fine.这工作正常。

Even if u have a pip error ie cannot import name 'Flowcontrol', U can try this method.即使您有 pip 错误,即无法导入名称“Flowcontrol”,您也可以尝试此方法。

Peace!!和平!!

I solved the issue by downgrade tensorflow to version 2.0我通过将 tensorflow 降级到 2.0 版解决了这个问题

pip install --user tensorflow==2.0

per Github enter link description here每个 Github在此处输入链接描述

My platform: win10 python 3.7 tensorflow 2.1我的平台:win10 python 3.7 tensorflow 2.1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MeCab:“ImportError:DLL 加载失败:找不到指定的模块。” - MeCab: “ImportError: DLL load failed: The specified module could not be found.” MeCab:“ ImportError:DLL加载失败:找不到指定的模块。” - MeCab: “ImportError: DLL load failed: The specified module could not be found.” ImportError:DLL加载失败:找不到指定的过程。蟒蛇 - ImportError: DLL load failed: The specified procedure could not be found. Python pycairo“ImportError:DLL加载失败:无法找到指定的模块。”即使安装了DLL - pycairo “ImportError: DLL load failed: The specified module could not be found.” even after DLLs installed ImportError:DLL加载失败:找不到指定的模块。 Caffe安装 - ImportError: DLL load failed: The specified module could not be found. Caffe install ImportError:DLL加载失败:找不到指定的模块。 尝试“从PIL导入图像”时 - ImportError: DLL load failed: The specified module could not be found. when trying to “from PIL import Image” 导入 tensorflow 时,出现错误“导入错误:DLL 加载失败:找不到指定的模块。” - While importing tensorflow, got the error 'ImportError: DLL load failed: The specified module could not be found.' DeepSpeech 安装错误:“ImportError:DLL 加载失败:找不到指定的模块。” - DeepSpeech Installation Error: "ImportError: DLL load failed: The specified module could not be found." ImportError:DLL加载失败:找不到指定的模块。 CV2 - ImportError: DLL load failed: The specified module could not be found. cv2 ImportError:DLL加载失败:找不到指定的模块。 “matplotlib.pyplot” - ImportError: DLL load failed: The specified module could not be found. “matplotlib.pyplot”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM