您好,欢迎来到年旅网。
搜索
您的当前位置:首页未命名文档

未命名文档

来源:年旅网
Install OpenCV in Windows for Python

Hi Friends,

Here I will tell you how to install OpenCV 2.4x in Windows for Python 2.7.

Pre-requisites ( need to be downloaded ) :

Python : Download latest version of Python 2.7 from Python site . Numpy : Download Numpy for Python 2.7 from here . OpenCV 2.4 : Download OpenCV for windows from here . Install:

1) First install Python 2.7. Leave all settings as default. In that case, Python will be installed in default folder C:\\Python27\\

2) Now install Numpy. Again leave everything default. Numpy will find Python directory and will be installed to most appropriate folder.

3) Now double-click OpenCV.exe. It will ask for extraction folder. Give it as just C:\\ . It will extract all files to C:\\opencv\\ . Wait until everything is extracted.

4) Now copy everything in the folder C:\\opencv\\build\\python\\x86\\2.7\\ ( most probably, there will be only one file cv2.pyd ) and paste it in the folder C:\\Python27\\Lib\\site-packages\\

5) Now open your "Python IDLE" ( from Start > All Programmes > Python 2.7 > Python IDLE ) and just type following :

import cv2

If everything OK, it will import cv2 module, otherwise an error message will be shown.

So it is very simple procedure. Try it yourself and let me know how it goes.

NB : Even if you are using -bit windows, do the same procedure. ( Better don't go for -bit Python and Numpy )

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- oldu.cn 版权所有 浙ICP备2024123271号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务