install opencv for anaconda ipython
4.[optional] Building python. Set the following python parameters:
- PYTHON2(3)_EXECUTABLE = <path to python>
- PYTHON_INCLUDE_DIR = /usr/include/python<version>
- PYTHON_INCLUDE_DIR2 = /usr/include/x86_64-linux-gnu/python<version>
- PYTHON_LIBRARY = /usr/lib/x86_64-linux-gnu/libpython<version>.so
- PYTHON2(3)_NUMPY_INCLUDE_DIRS = /usr/lib/python<version>/dist-* packages/numpy/core/include/
2.x版本安装
python2.4.11安装
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_GENERATION=Kepler BUILD-NEW-PYTHON-SUPPORT=ON . # 命令行
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D CUDA_GENERATION=Kepler BUILD-NEW-PYTHON-SUPPORT=ON ..
make install -j32以后可以到编译出来的目录下寻找lib/cv2.so,复制到对应的python目录(dist-package等)
拷贝 cv2.so -----> anaconda/python2.7/site-package/cv2.so python就可以利用opencv的库
2.x安装参考
http://www.megalinux.net/compiling-opencv-2-4-on-rhelcentos-5/
stackoverflow上的问题
http://stackoverflow.com/questions/17287250/install-opencv-for-python-multiple-python-versions