[英]ImportError: DLL load failed: The specified procedure could not be found. Python
Recently, I have installed a current version of Python(x,y) package (2.7.6.0) and now when I run my python code, it shows an error: 最近,我安装了当前版本的Python(x,y)包(2.7.6.0),现在当我运行我的python代码时,它显示一个错误:
Traceback (most recent call last):
File "D:\Projects\comparison\Lagebestimmung\main.py", line 11, in <module>
import cv2
ImportError: DLL load failed: The specified procedure could not be found.
I correctly selected opencv module during the installation. 我在安装过程中正确选择了opencv模块。
Also, I use to have an older version of Python(x,y) before in my computer which I uninstalled before installing the new version. 另外,我之前在我的计算机中使用旧版本的Python(x,y),我在安装新版本之前卸载了该版本。 In that version, there was no such problem.
在那个版本中,没有这样的问题。
Try this: Install opencv for windows. 试试这个:安装opencv for windows。 download it at here :
在这里下载:
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.1/OpenCV-2.4.1.exe/download
Then 然后
Copy cv2.pyd from C:\opencv\build\python\x86\2.7\ and paste it in the folder python site-packages folder . restart your IDE.
Make sure numpy is installed. 确保安装了numpy。 If not , get it from here ..
如果没有,从这里得到它..
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
For programmers using python 3, download a wheel package in order to install OpenCV. 对于使用python 3的程序员,下载一个wheel包以安装OpenCV。
You will need to make sure that NumPy is already installed. 您需要确保已安装NumPy。 Anaconda is a nice package to handle dependencies.
Anaconda是一个很好的处理依赖项的包。 You would get numpy out of the box with it.
你可以用它来开箱即用。
Then, download the OpenCV version corresponding to your Python installation version from : http://www.lfd.uci.edu/~gohlke/pythonlibs/ 然后,从http://www.lfd.uci.edu/~gohlke/pythonlibs/下载与您的Python安装版本对应的OpenCV版本。
You can find the version of your Python interpreter by running: 您可以通过运行以下命令找到Python解释器的版本:
python --version
In my case as I run C-Python 3.5 , I chose : opencv_python‑3.2.0‑cp 35 ‑cp 35 m‑win_amd64.whl 在我运行C-Python 3.5的情况下,我选择了:opencv_python-3.2.0-cp 35 -cp 35 m-win_amd64.whl
Finally, in the directory you have downloaded the wheel package, run: 最后,在已下载wheel包的目录中,运行:
pip install opencv_python-3.X.X-cpXX-cpXXm-xxxx.whl
我有同样的问题,当我使用ipython [只是在cmd上写ipython如果你安装了ipython]它的工作原理。
the following worked for me. 以下为我工作。 Assuming that Python(X,Y) is installed (and the option for OpenCV was checked at the beginning of the installation), I did the following steps:
假设安装了Python(X,Y)(并且在安装开始时检查了OpenCV的选项),我执行了以下步骤:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.