最近要用python做一些opencv的实验,发现系统升级后(macOS Sierra 10.12.5),编译opencv时提示Fatal error:QTKit.h not found。
改为brew安装。
1. python 2.7: brew install opencv
2. python 3.6: brew install opencv3 –with-python3 –with-contrib –without-python
3. export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6/site-packages:/usr/local/opt/opencv3/lib/python3.6/site-packages
没有”–without-python”的话,会报错“Error: opencv3: Does not support building both Python 2 and 3 wrappers”。备忘!