If Things Go Wrong
Clone this wiki locally
There are different areas of typical problems which can occur when using PyInstaller. For fixing problems in your application, it is critical to understand this:
Some required modules, shared libs or data files are not frozen (packaged, bundled) into the resulting exec.
This kind of problems are to be solved within the "freeze" phase by:
- collecting files or modules within the
- implementing a new hook (or fixing an existing one)
- fixing a bug in PyInstaller.
To check if all your files are frozen, use
utils/archive_viewer.py. See Make sure everything is packaged for more information.
You application can not import some module, list modules, find data files, etc.
This kind of problems has to be solved within our application by:
- adapting your application to be frozen (see the manual)
- If generic parts of your application are effected (e.g. commonly used packages like Tkinter, GTK, QT), adding a runtime-hook will help others users
Prior to solving "Type 2" problems, you need to ensure there are no "Type 1" problems. You first of all you need to find out which type of problem you are facing. See Before submitting a report for how to do this.
Please note: If your application is complex, there may be several "Type 1" and several "Type 2" problems.
PyInstaller crashes when packaging my program.
Please try the development version (zip, tar.gz) first. If even this version does not work, it looks like a bug. Please have a look at HowtoReportBugs, which will help us a lot on solving the problem.
I get an
ImportErrorwhen running the packaged version. What should I do? Please make sure, all modules required by you application are packaged. See Make sure everything is packaged for more information.
Failed to execute script. What should I do? Build the app without
--windowedand run it from a command prompt to get the full error output before submitting a bug report.
My program crashes when running the packaged version. What should I do?
Please make sure, all data files required by you application are packaged. See Make sure everything is packaged for more information.
I made it work by implementing a hook. Do you want it?
Yes, we'll happily integrate any hook which may be of interest for others. Please open a ticket and attach the hook. Or even better: submit a pull-request.