安装numpy
pip install numpy -i
pip2 install numpy -i
编译
tar -zxvf opencv-4.5.1.tar.gz
cd opencv-4.5.1
cmake3 \
-D CMAKE_BUILD_TYPE=RELEASE\
-D INSTALL_C_EXAMPLES=OFF\
-D INSTALL_PYTHON_EXAMPLES=ON\
-D BUILD_EXAMPLES=OFF\
-D ENABLE_CXX11=ON\
-D BUILD_opencv_python3=ON\
-D BUILD_opencv_java=OFF\
-D PYTHON3_EXECUTABLE=$(which python3)\
-D PYTHON3_INCLUDE_DIR=/usr/local/anaconda3/include/python3.7m\
-D PYTHON3_LIBRARY=/usr/local/anaconda3/lib/libpython3.7m.so.1.0\
-D PYTHON3_NUMPY_PATH=/var/code/python/U-Net_detect_and_recolor_hair/venv/lib64/python3.7/site-packages ..
#支持python2
-D BUILD_opencv_python2=ON \
-D PYTHON2_EXECUTABLE=$(which python2)\
-D PYTHON2_INCLUDE_DIR=/usr/local/anaconda2/include/python2.7 \
-D PYTHON2_LIBRARY=/usr/local/anaconda2/lib/libpython2.7.so.1.0 \
-D PYTHON2_NUMPY_PATH=/usr/local/anaconda2/lib/python2.7/site-packages ..
make
make install
阅读(2198) | 评论(0) | 转发(0) |