因为之前用pip 安装的PySIde2,而这种方式安装的PySide2只有源码缺少缺少lib库。所以用pyinstaller打包时会包报没发现lib。
12662 WARNING: lib not found: shiboken2.dll dependency of D:\Python\JDReminding\venv\lib\site-packages\PySide2\QtGui.p
yd
12871 WARNING: lib not found: shiboken2.dll dependency of D:\Python\JDReminding\venv\lib\site-packages\PySide2\QtWidge
ts.pyd
13026 WARNING: lib not found: shiboken2.dll dependency of D:\Python\JDReminding\venv\lib\site-packages\PySide2\QtCore.
pyd
13143 WARNING: lib not found: shiboken2.dll dependency of D:\Python\JDReminding\venv\lib\site-packages\PySide2\QtNetwo
rk.pyd
14200 WARNING: lib not found: shiboken2.dll dependency of D:\Python\JDReminding\venv\lib\site-packages\PySide2\pyside2
.dll
用–paths 告诉pyinstaller去哪找到特定的库:
pyinstaller --paths D:\Python\JDReminding\venv\Lib\site-packages\shiboken2 hello.py