Ask Your Question
2

install opencv for anaconda ipython

asked 2013-07-25 08:41:40 -0600

mrgloom gravatar image

updated 2013-07-26 08:55:25 -0600

seems opencv is availible only for linux as pkg http://docs.continuum.io/anaconda/pkgs.html

how to install opencv for anaconda ipython?

I think OpenCV must be added to Python Package Index https://pypi.python.org/pypi

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
4

answered 2013-07-27 19:10:35 -0600

If you compile OpenCV from source, and Anaconda is your default python interpretor (CMake rule PYTHON_PACKAGES_PATH = C:\Anaconda\Lib\site-packages), then the install rule will copy cv2.pyd to C:\Anaconda\Lib\site-packages. Otherwise, you could do it manually, and make sure OpenCV libs are in the PATH.

edit flag offensive delete link more
1

answered 2019-12-23 03:03:57 -0600

Kumar Gaurav gravatar image

Anaconda Python OpenCV-----------------

  1. Remove all previous/current (if any) python installation
  2. Install Anaconda and add anaconda to PATH(Envirnoment variables:: Adavanced system setting->Environment variables->under system variables go to variable PATHand click edit to add new envirnomental variables) (During installation check box involve PATH)
  3. Open anaconda prompt with admin access. type and enter:-
    conda update --all
  4. conda install -c menpo opencv (for opencv)
  5. conda install spyder=4.0.0 (spyder updation)
  6. conda update python (for python updation)
edit flag offensive delete link more
1

answered 2014-11-19 13:45:31 -0600

pcp16 gravatar image

I've just gone through the whole process, therefore, I find the previously given answer a bit too vague (sorry, no offence).

You will need to compile OpenCV for yourself (not daunting, I hope). And you will need to change the variable that was pointed out before, but not just this variable (PYTHON_PACKAGES_PATH) but also all those referring to PYTHON paths (starting by PYTHON2_ or PYTHON3_), for instance:

PYTHON2_EXECUTABLE PYTHON2_INCLUDE_DIR PYTHON2_LIBRARY PYTHON2_NUMPY_INCLUDE_DIRS PYTHON2_PACKAGES_PATH

In all of them, you'll need to specify the path to the anaconda installation, not the system-installed Python interpreter (CMake, the tool used to compile OpenCV might automatically find either, or even a mixture!).

I would recommend you follow a step-by-step guide if you are not familiar with the compiling process. There are plenty, for Fedora 20, which is what I am using, you can find:

http://docs.opencv.org/trunk/doc/py_tutorials/py_setup/py_setup_in_fedora/py_setup_in_fedora.html

Even if you don't have Fedora, it might be useful to check all of the CMake variables they set, since this is made to reduce the compilation time, and avoid unnecessary modules that the Python module 'cv2' might not be able to use anyway).

After the compilation, I got an IMPORT_ERROR in Python when doing 'import cv2'. In my case, this was due to the dynamic libraries of opencv trying to reach the wrong version of 'libm.so'. So, please make sure you rename your "libm.so" under the Anaconda directory to something like 'libm.so.old', so that your libopencv*.so files can find the 'proper' one installed by the system. This shouldn't break Anaconda. See the following post for details:

https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/rX_c12a7Sps

I hope this helps!

edit flag offensive delete link more
-1

answered 2019-12-25 04:06:27 -0600

Step 1: Install Anaconda (a python distribution) Download and installation Anaconda 64-bit version from https://www.continuum.io/downloads. It is cautioned to installation Anaconda for Python three ... Step 2 : Create Virtual Environment. Open the command prompt and execute the following command. ... Step 3 : Install OpenCV. 3.1.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-07-25 08:41:40 -0600

Seen: 20,263 times

Last updated: Dec 25 '19