Pyinstaller去掉黑框时遇到的问题

    技术2022-07-11  106

    参考链接:https://stackoverflow.com/questions/37815371/pyinstaller-failed-to-execute-script-pyi-rth-pkgres-and-missing-packages

     

    因为工厂的操作工一直会关掉app,所以打算去掉后面的黑框后台运行.

    使用如下命令:

    pyinstaller xxx.py --noconsole or pyinstaller -w xxx.py (-w就是取消窗口)

    运行程序出现:

    找到对应的.spec文件,找到 hiddenimports=[], 添加为hiddenimports=["pkg_resources.py2_warn"]。运行.spec文件。

    pyinstaller tester_108.spec

    这样就不会有黑框出现了。 

    怎么关闭后台运行的程序?

     

    taskkill /f /t /im + app name 

     

    Processed: 0.010, SQL: 9