简体   繁体   中英

installing opencv Anaconda2 on windows machine

I'm trying to install openCV in a freshly installed Anaconda2 on a 64 bit windows machine with no luck.

I downloaded 2.4.9 form the openCV website and did pretty much which http://mathalope.co.uk/2015/05/07/opencv-python-how-to-install-opencv-python-package-to-anaconda-windows/ (and many others) suggested. Briefly, copying cv2.pyd from the opencv's python\\2.7\\x64 folder to Anaconda2\\Lib\\site-packages folder.

When I try to import it in python I'm getting the following error:

ImportError: DLL load failed: 1% in not a valid Win32 application.

any idea what's wrong?

Edit: opencv is no longer in the conda repository, but it can be installed via binstar as follows. This example also uses a virtual environment , but you can install directly into your default if you prefer.

conda create --name opencv_test python=2.7

conda install --name opencv_test -c https://conda.binstar.org/menpo opencv
conda info --envs
conda list --name opencv_test
activate opencv_test
# Use deactive to return to the default environment.
deactivate
# Remove test environment if you no longer need it.
conda remove --name opencv_test --all

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM