[英]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. 我已经将
numpy
和cv2
模块添加到我的python目录中,并设置了它们的环境变量。
I also installed msvcp71.dll
and msvcr71.dll
, but this error has not solved. 我还安装了
msvcp71.dll
和msvcr71.dll
,但此错误尚未解决。
So how can i fix this kind of dll problem? 那么我该如何解决这种dll问题呢?
Version information: 版本信息:
Python 3.2 Python 3.2
numpy-1.6.1-win32-superpack-python3.2 numpy的-1.6.1-Win32的superpack-python3.2
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
python
与x86 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: 查看此处的讨论:
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.