From the extracted folder, copy the file from the extracted directory: opencv/build/python/2.7/(either x86 or 圆4, depending on your Anaconda version)/cv2.pyd to your Anaconda site-packages directory, e.g., C:\Anaconda\Lib\site-packages.In any case, installation of OpenCV into Anaconda, although unavailable through conda, is pretty trivial. (Funny, I do recall it being included at a previous point as well.) It doesn't seem like the page you linked includes opencv any more. My environment is GCC 4.4.6, Python 2.7 (anaconda), and opencv-2.4.10. You will find cv2.so in anaconda/lib/python2.7/site-packages. If conda install opencv or conda install -c opencv does not work, you can try to compile from the source.ĭownload the source from, follow the install instruction in, (maybe you can jump to the last part directly, ' Building OpenCV from Source Using CMake.), change the cmake command as following: mkdir releaseĬmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/home/**/env/opencv-2.4.10 -D BUILD_NEW_PYTHON_SUPPORT=ON -D PYTHON_EXECUTABLE=/home/**/env/anaconda/bin/python -D PYTHON_INCLUDE_DIR=/home/**/env/anaconda/include/python2.7 -D PYTHON_LIBRARY=/home/**/env/anaconda/lib/libpython2.7.so -D PYTHON_PACKAGES_PATH=/home/**/env/anaconda/lib/python2.7/site-packages -D PYTHON_NUMPY_INCLUDE_DIRS=/home/**/env/anaconda/lib/python2.7/site-packages/numpy/core/include. There is a PR on its way to solve the issue." It is due to a combination of an upstream OpenCV issue in combination with an old GCC. It silently fails to read and write videos. Ubuntu 16.10 has deprecated libpng12, leading to a missing dependency and the following error when trying to import cv2: ImportError: libpng12.so.0: cannot open shared object file: No such file or directory, as discussed hereĮDIT: points out that as of 14 June 2017, "there is an issue with loopbio's OpenCV version 3.2.0.they have only built OpenCV 3.2 for Python 3.5, not Python 3.6.Conda built by Menpo ( conda install -c menpo opencv3) has gtk2 support, but.The conda you get through conda install opencv or pip install opencv-python doesn't have gtk2 support, so you can't display images through imshow.Two of the solutions mentioned in other answers don't work unconditionally: If you have 'a modern CPU' there exists also a compiled version "enabling all modern CPU instruction set extensions and against libjpeg-turbo": conda install -c loopbio -c conda-forge -c pkgw-forge ffmpeg-feature ffmpeg gtk2 opencv-turbo` On Linux, as discussed here, the best way to get opencv at present is from loopbio at conda-forge: conda install -c loopbio -c conda-forge -c pkgw-forge ffmpeg-feature ffmpeg gtk2 opencv your ready to run the code!!Īfter you finish all the steps, you can now test the code in SPYDER python that I use When all the package is completely installed, then you must Reboot it. on win32 Type "help", "copyright", "credits" or "license" for more information.Ĭonda install -c conda-forge opencv = (version optional) Make sure that the anaconda-python is configured in CMD adminĬ:\WINDOWS\system32>python Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) YOU NEED TO HAVE WINDOWS OS to begin this project.Īlong the way you must check all the options ignore the red text I had steps in repo that will help you properly install OpenCV.įor requirements and prerequisites follow this instructions:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |