ImportError: DLL load failed: 找不到指定的模块 解决方案汇总

您所在的位置:网站首页 找不到adapt_for_importsdll ImportError: DLL load failed: 找不到指定的模块 解决方案汇总

ImportError: DLL load failed: 找不到指定的模块 解决方案汇总

2023-08-25 03:06| 来源: 网络整理| 查看: 265

import numpy as np Traceback (most recent call last):   File "F:\Anaconda3\envs\tensorflow2\lib\site-packages\numpy\core\__init__.py", line 22, in     from . import multiarray   File "D:\Program Files\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import     module = self._system_import(name, *args, **kwargs)   File "F:\Anaconda3\envs\tensorflow2\lib\site-packages\numpy\core\multiarray.py", line 12, in     from . import overrides   File "D:\Program Files\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import     module = self._system_import(name, *args, **kwargs)   File "F:\Anaconda3\envs\tensorflow2\lib\site-packages\numpy\core\overrides.py", line 7, in     from numpy.core._multiarray_umath import (   File "D:\Program Files\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import     module = self._system_import(name, *args, **kwargs) ImportError: DLL load failed: 找不到指定的模块。 During handling of the above exception, another exception occurred: Traceback (most recent call last):   File "F:\Anaconda3\envs\tensorflow2\lib\site-packages\IPython\core\interactiveshell.py", line 3418, in run_code     exec(code_obj, self.user_global_ns, self.user_ns)   File "", line 1, in     import numpy as np   File "D:\Program Files\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import     module = self._system_import(name, *args, **kwargs)   File "F:\Anaconda3\envs\tensorflow2\lib\site-packages\numpy\__init__.py", line 140, in     from . import core   File "D:\Program Files\PyCharm Community Edition 2018.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import     module = self._system_import(name, *args, **kwargs)   File "F:\Anaconda3\envs\tensorflow2\lib\site-packages\numpy\core\__init__.py", line 48, in     raise ImportError(msg) ImportError:  IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed. We have compiled some common reasons and troubleshooting tips at:     https://numpy.org/devdocs/user/troubleshooting-importerror.html Please note and check the following:   * The Python version is: Python3.7 from "F:\Anaconda3\envs\tensorflow2\python.exe"   * The NumPy version is: "1.19.4" and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help. Original error was: DLL load failed: 找不到指定的模块。  

奇怪的是这个终端可以就是pycharm不行,jupyter notebook也不行

1关于在终端能到import模块 而在jupyter notebook无法导入的问题

关于在终端能到import模块 而在jupyter notebook无法导入的问题_一颗行走的大白菜的博客-CSDN博客

发现是一样的,和我出现问题不一样,

2 还有版本不匹配,卸载重装,对我这种还是没用

3 对于任何出现此问题并找到此线程的人: numpy 不是问题, 而是 VS 代码的问题。您需要告诉 VS 代码在设置中激活适当的 conda 环境:Python>终端:激活环境。请注意,如果使用默认设置安装 anaconda,则如果终端是 git bash,则无法正常工作,但如果使用 cmd(和集成终端),则工作正常。 

没有解决,因为我是在pycharm上运行的

4 也有人说,使缓存无效并重新启动:

还是没有解决

5、

不行

6、Pycharm中出现ImportError:DLL load failed:找不到指定模块的解决方法_ACE小海豚的博客-CSDN博客

还不行

8:这个问题也有可能是intel的DLL文件造成的。 intel有mkl*.dll在C:\Users\peter\AppData\Local\Continuum\anaconda3\Library\bin目录下, 把这个目录添加到PATH,系统的环境变量里,然后重启终端就可以了(注意替换成自己的目录)。

这个你打开C:\Users\peter\AppData\Loca可能找不到直接替换成你的目录直接添加就行,但是不是我的这种情况

我要……

最终在删除numpy 在pycharm里进行安装就行了,不知道是哪一步起来左右 …………………………………………………………………………我的一下午

ps:添加anacoda环境依赖不知道是不是在安装时选择了第一个



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3