用 pyqt 写了个小工具,要打包给同事用。但是传过去打开后,发现报错了,提示
This application failed to start because it could not find or load the Qt platform plugin windows installing the application may fix this problem
但是本机、虚拟机都没问题,32、64bit 也都测了。于是就把问题定位到了系统环境本身的问题,百度了一翻,靠谱的答案没几个。
顺便还解决了其他的乱七八糟的缺失 dll 的错误
...
3743 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of c:\python36-32\python36.dll
3862 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\python36-32\python36.dll
...
类似 lib not found: api-ms-win-xxxxxxxxxxxx.dll这样的提示,直接复制一份到程序所在目录就可以了。
dll 打包
为了方便后面躺坑的,把我的 dll 文件打包传上来,下载地址: https://pan.baidu.com/s/1dTBwui
资料参考