一些错误提示,这错误就是PyQt5安装的太新了
Traceback (most recent call last):
File "/Applications/anaconda3/envs/tensorflow/lib/python3.6/site-packages/labelImg/labelImg.py", line 15, in <module>
from PyQt5.QtGui import *
ImportError: dlopen(/Applications/anaconda3/envs/tensorflow/lib/python3.6/site-packages/PyQt5/QtGui.abi3.so, 2): Symbol not found: _futimens
Referenced from: /Applications/anaconda3/envs/tensorflow/lib/python3.6/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
in /Applications/anaconda3/envs/tensorflow/lib/python3.6/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore
主要是这个 (which was built for Mac OS X 10.13)
在网上查询后估计是pyqt5与sip版本不匹配
先卸载sip和pyqt5
pip uninstall sip pyqt5 -y
装上4.19.8的sip和5.12.1的PyQt5
pip install sip==4.19.8 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
pip install PyQt5==5.12.1 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
然后再重新编译打包就好了,就能在10.12系统运行了