PyInstaller创建缓慢的可执行文件 [英] PyInstaller creates slow executable

查看:141
本文介绍了PyInstaller创建缓慢的可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PyInstaller使用PyQt创建python程序的单个可执行文件.它会创建.exe并可以正常运行,但需要15到20秒才能启动.我以为可以通过创建启动画面来实现,这样用户至少可以知道正在发生什么,不幸的是,启动画面的显示速度不会比程序窗口本身快.我还创建了与-onedir相同的程序,该程序确实可以更快地启动,但这并不是分发的真正选择.如果有人对降低执行速度和加快执行速度的方法有任何想法,我当然会很感激.谢谢.

I'm using PyInstaller to create a single executable of a python program using PyQt. It creates the .exe and runs fine, but takes between 15 to 20 seconds to start. I thought I could get by with creating a splash screen so the user would at least know something was happening, unfortunately, the splash screen doesn't show up any quicker than the program window itself. I also created the same program as -onedir, the program does start quicker, but this isn't really an option for distribution. If anyone has any ideas on what is slowing down the execution and ways to speed things up I would certainly appreciate it. Thanks.

推荐答案

请查看Pyinstaller Wiki

Please look at this info provided with Pyinstaller wiki, http://www.pyinstaller.org/export/latest/tags/1.5/doc/Manual.html?format=raw#how-one-file-mode-works

据此,第一次启动时,它(一个文件exe)发现需要提取这些文件才能运行真正"..在用户的temp目录下创建临时文件夹并提取内容花费了最初的时间.

according to this, When first started, it(one file exe) finds that it needs to extract these files before it can run "for real". . This creation of temporary folder under user's temp directory and extraction of content took initial time.

这篇关于PyInstaller创建缓慢的可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆