简体   繁体   English

Windows,ImportError:DLL加载失败:找不到指定的模块

[英]windows, ImportError: DLL load failed: The specified module could not be found

import numpy as np
import cv2
from matplotlib import pyplot as plt

img = cv2.imread('12.jpg',0)
orb = cv2.ORB()
kp = orb.detect(img,None)
kp, des = orb.compute(img, kp)
img2 = cv2.drawKeypoints(img,kp,color=(0,255,0), flags=0)
plt.imshow(img2),plt.show()

I have added the numpy and cv2 modules to my python directory and set their environment variables. 我已经将numpycv2模块添加到我的python目录中,并设置了它们的环境变量。

I also installed msvcp71.dll and msvcr71.dll , but this error has not solved. 我还安装了msvcp71.dllmsvcr71.dll ,但此错误尚未解决。

So how can i fix this kind of dll problem? 那么我该如何解决这种dll问题呢?

Version information: 版本信息:

  1. Python 3.2 Python 3.2

  2. numpy-1.6.1-win32-superpack-python3.2 numpy的-1.6.1-Win32的superpack-python3.2

  3. opencv-3.0.0 OpenCV的-3.0.0

I suspect you've mixed a x64 python with x86 cv2.pyd file, or vice versa. 我怀疑您已经将x64 pythonx86 cv2.pyd文件混合了,反之亦然。 Simple way is to install a right version of opencv here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv 简单的方法是在此处安装正确版本的opencv: http : //www.lfd.uci.edu/~gohlke/pythonlibs/#opencv

See discussions here: 查看此处的讨论:

  1. ImportError: DLL load failed: %1 is not a valid Win32 application. ImportError:DLL加载失败:%1不是有效的Win32应用程序。 But the DLL's are there 但是DLL在那里
  2. How to use OpenCV in Python? 如何在Python中使用OpenCV?

To check your python arch: 要检查您的python拱门:

In [2]: import platform

In [3]: platform.architecture()
Out[3]: ('64bit', 'WindowsPE')

and cv2.pyd : I suggest using PESnoop : cv2.pyd :我建议使用PESnoop

D:\Anaconda\Lib\site-packages> PESnoop cv2.pyd /pe_dh
-------------------------------------------------------------------------------
 PESnoop 2.0 - Advanced PE32/PE32+/COFF OBJ,LIB command line dumper by yoda
-------------------------------------------------------------------------------

Dump of file: cv2.pyd...
Modus:        64bit Portable Executable Image...

discussions: 讨论:

https://serverfault.com/questions/29958/how-to-tell-if-a-windows-application-requires-64-bit https://serverfault.com/questions/29958/how-to-tell-if-a-windows-application-requires-64-bit

How can I determine for which platform an executable is compiled? 如何确定可执行文件在哪个平台上编译?

暂无
暂无

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

相关问题 Windows 上的 Tensorflow - ImportError:DLL 加载失败:找不到指定的模块 - Tensorflow on windows - ImportError: DLL load failed: The specified module could not be found Skilearn导入错误:DLL加载失败:找不到指定的模块 - Skilearn ImportError: DLL load failed: The specified module could not be found 对象检测 - 导入错误:DLL 加载失败:找不到指定的模块 - Object detection - ImportError: DLL load failed: The specified module could not be found ImportError:DLL加载失败:在PyCharm中找不到指定的模块 - ImportError: DLL load failed: The specified module could not be found in PyCharm tensorflow 2.3.1 导入错误:DLL 加载失败:找不到指定的模块 - tensorflow 2.3.1 ImportError: DLL load failed: The specified module could not be found anaconda3中的ImportError:DLL加载失败:找不到指定的模块 - ImportError in anaconda3 : DLL load failed: The specified module could not be found ImportError: DLL 加载失败:在 python 中找不到指定的模块 - ImportError: DLL load failed: The specified module could not be found in python ImportError: DLL 加载失败:找不到指定的模块? - ImportError: DLL load failed: The specified module could not be found? Python:ImportError:DLL加载失败:找不到指定的模块 - Python: ImportError: DLL load failed: The specified module could not be found ImportError:DLL加载失败:找不到指定的模块 - ImportError: DLL load failed: The specified module could not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM