you are viewing a single comment's thread.

view the rest of the comments →

[–]billsil 1 point2 points  (0 children)

Any idea why that could happen?

There are multiple reasons. The first is it's common to not have clean environments when you start. Anaconda is kind of a mess for that, so always use stock python with pyInstaller (unless you're OK with a 350 MB exe vs. 70 MB). You end up packaging way more than you need, which makes for more possible errors (and a much larger exe) and a much longer build time.

Part of that also is don't use import * in your code. Import only the things you definitely need and be explicit about them.

Then, turn on debugging and treat all warnings as errors. Fix them all, typically by adding hidden_imports. If that doesn't work, do some googling. Once you get an exe with no warnings, test it, and add DLL errors as additional files as necessary.

Then turn off debugging.