git clone https://github.com/opencv/opencv.git opencv_source
mkdir build_opencv; cd build_opencv
cmake -DCMAKE_INSTALL_PREFIX=../opencv -DPYTHON_DEFAULT_EXECUTABLE=/opt/intel/intelpython35/bin/python3 -DWITH_VA_INTEL=ON -DBUILD_opencv_python3=ON -DPYTHON3_INCLUDE_PATH=/opt/intel/intelpython35/include/python3.5m ../opencv_source
make install -j8
Once built without error setup PYTHONPATH
export PYTHONPATH=$PYTHONPATH:~/opencv/lib/python3.5/site-packages/
git clone https://github.com/opencv/opencv.git opencv_source
mkdir build_opencv; cd build_opencv
cmake -DCMAKE_INSTALL_PREFIX=../opencv -DPYTHON_DEFAULT_EXECUTABLE=/opt/intel/intelpython27/bin/python2 -DWITH_VA_INTEL=ON -DBUILD_opencv_python2=ON -DPYTHON2_INCLUDE_PATH=/opt/intel/intelpython27/include/python2.7 ../opencv_source
make install -j8
Once built without error setup PYTHONPATH
export PYTHONPATH=$PYTHONPATH:~/opencv/lib/python2.7/site-packages/