For Python 3.x, I guess, just change the 2.x to 3.x accordingly. Our goal is to copy and paste the cv2.pyd file to this directory (so that we can use the import cv2 in our Python codes.).įrom this OpenCV directory (the beginning part might be slightly different on your machine). C:\Users\Johnny\Anaconda\Lib\site-packages in my case) contains the Python packages that you may import. The Anaconda Site-packages directory (e.g.
![conda install opencv anaconda conda install opencv anaconda](https://user-images.githubusercontent.com/11352113/61011914-735ea280-a34a-11e9-91fc-941c4d408338.png)
In my case, I've extracted the package (essentially a folder) straight to my C drive ( C:\opencv). I am on Python 2.x and OpenCV 3.x - mainly because this is how the OpenCV-Python Tutorials are setup/based on. Download OpenCV Packageįirstly, go to the official OpenCV site to download the complete OpenCV package. So far I have got it working on both my desktop and laptop, both 64-bit machines and Windows 8.1. The following instruction works for me is inspired by this OpenCV YouTube video. you may be able to use OpenCV, but you won't be able to process videos. That method however does not include the FFMPEG codec - i.e. Install OpenCV-Python to AnacondaĬautious Note: I originally tried out installing the OpenCV package, as suggested. It seems to be recommended everywhere in the scientific community. (Read on for the detail instructions.) Prerequisite Install AnacondaĪnaconda is essentially a nicely packaged Python IDE that is shipped with tons of useful packages, such as NumPy, Pandas, IPython Notebook, etc.
![conda install opencv anaconda conda install opencv anaconda](https://i.stack.imgur.com/szQmO.png)
#CONDA INSTALL OPENCV ANACONDA WINDOWS 10#
If you are using Windows 10 and Anaconda/Python 3.x, and this solution works, please add a comment below. NOTE 2: this will probably work for Anaconda/Python 3.x too.
![conda install opencv anaconda conda install opencv anaconda](https://miro.medium.com/max/1400/1*OehaCEd4WmNfnekiQTXhGw.png)
NOTE 1: as mentioned mentioned by (thank you) in comment section however, this solution appears to also work for Windows 10. (see notes below - this works also for Windows 10, and likely Python 3.x too). Nevertheless I've copied and pasted the important bits to this post.Īt the time of writing I was using Windows 8.1, 64-bit machine, Anaconda/ Python 2.x.
#CONDA INSTALL OPENCV ANACONDA HOW TO#
I have summarized my now fully working solution, OpenCV-Python - How to install OpenCV-Python package to Anaconda (Windows).