Skip to content
Advertisement

Pyinstaller one file package is leaving temp files when crashed, how to clean those automatically?

I am using pyinstaller to create one file executable with command line. Like all “one file” exeutables, it extracts binaries/dependencies in one temporary folder of OS whenever opened. It generally clean those after closing the application properly but when I close the command line (or when the app crashes) then it leaves all those extracted temp files behind in that temp folder. And it creates new temp folder (with name “_MEIxxxxxx”) every time I open the app, so the old crashed temp stays there if not cleaned manually. I used the --runtime-tmpdir parameter to specify one separate temp folder, but the same is happening there also. Any fix to this?

Advertisement

Answer

This issue was there from a very long time, but it’s finally fixed in the new 5.3 version.

So for those who are facing this issue, just update pyinstaller to the latest version (5.3+).

Now the “_MEIxxxxxx” folder gets deleted if we close the parent console window or terminate the process in task-manager or even if we shutdown the system.

You can view the full changelog here

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement