pyinstaller解决闪退问题

step 1:在打包的py文件主函数最后一行添加以下代码(区分python2与python3)python2: raw_input("please input any key to exit!") python3: input("please input any key to exit!") step 2:打包 pyinstaller - F 你的py文件 step 3:直接点击dist文件中的exe文件就可以了

【pyinstaller解决闪退问题】亲自测试过的,还有就是代码里面需要的相关文件最好要和可执行文件放在一起!!

    推荐阅读