一、ImageTk模块缺失的问题
ImportError: cannot import name 'ImageTk' from 'PIL' (/usr/lib/python3/dist-packages/PIL/__init__.py)
解决方法:
针对python3版本:
sudo apt-get install python3-pil python3-pil.imagetk
针对python2版本:
sudo apt-get install python-imaging python-imaging-tk
二、face模块缺失的问题
face模块实际上并不是opencv库的一部分。更确切地说,face是部分的的opencv-contrib库。
AttributeError: module 'cv2.cv2' has no attribute 'face'
解决方法:
pip install opencv-contrib-python