4.[optional] Building python. Set the following python parameters:
PYTHON2(3)_EXECUTABLE =
PYTHON_INCLUDE_DIR = /usr/include/python
PYTHON_INCLUDE_DIR2 = /usr/include/x86_64-linux-gnu/python
PYTHON_LIBRARY = /usr/lib/x86_64-linux-gnu/libpython.so
PYTHON2(3)_NUMPY_INCLUDE_DIRS = /usr/lib/python/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安装参考
stackoverflow上的问题