树莓派python3安装face_recognition和opencv2

一.安装face_recognition

 1 sudo pip3 install face_recognition 

 

二.安装pyhton3的opencv库

安装opencv依赖

1 sudo apt-get install libcblas-dev
2 sudo apt-get install libhdf5-dev
3 sudo apt-get install libhdf5-serial-dev
4 sudo apt-get install libatlas-base-dev
5 sudo apt-get install libjasper-dev 
6 sudo apt-get install libqtgui4 
7 sudo apt-get install libqt4-test

安装pyhton3的opencv库

 1 sudo pip3 install opencv-python 

如果报错提示"ImportError: /usr/local/lib/python3.7/dist-packages/cv2/cv2.cpython-37m-arm-linux-gnueabihf.so"

 

由于最新的OpenCV4不支持Pi,故卸载重新安装OpenCV3

 卸载当前:pip3 uninstall opencv-python

 重新安装:pip3 install opencv-python==3.4.6.27

 

posted @ 2020-04-20 11:38  K_Code  阅读(912)  评论(0编辑  收藏  举报