r/Python • u/not_afraid_of_trying • Mar 30 '26
Discussion Pyinstaller/Nuitka - Antivirus Flagging Issue
Python should have been there for non-techi users. We should be able to distribute executables built by PyInstaller or Nuitka to family and friends. Small utilities that single-thing is great time saver for them. But you cannot do that. Because anti-virus will come and flag your binary. They will do everything to scare your users away. Away from Python ecosystem. Powershell, Dotnet, go, rust, C++ self-contained executables are fine - just python exes are bad for antivirus community, especially if you add icon to your exe.
This is really unfortunate. PyInstaller is such a beautiful tool that can empower so many people... only if anti-virus software does better job of detecting good vs. bad.
NOTE: An alternative is to effectively “bribe the system” by acquiring a code-signing certificate, a tactic reportedly used by attackers. Or make everything as a web app.
View all comments
Show parent comment
1
u/zaphodikus Mar 31 '26
Last time, I used an old python binary tool, py2exe. It was a long time ago, do not believe it is available for python 3. I have a possible need for such a tool, but since Python exists on most desktop machines, might be able to avoid an exe. Not had a deep look at the modern tools myself. Why you want an exe depends on your use case.
I also have to distribute a C++ binary, and its the same problem, I'm slightly struggling, to undertand tour need. because I'm not sure what you are wanting that a small batch file cannot achieve. What program do you want to share, why not set up a website and do this program in Java. Basically you can use any sandbox.Are you wanting a native executable or not. All executables are flagged to some extent by AV, just sometimes for different reasons. And that will be based on O/S libraries they bind to at runtime or in their manifests. I know sorry, big words, but this is not an easy problem and hence, Python exe is possible, but to truly solve this you need to learn about signing of binaries and distributing a certificate too. I'm also assuming you are also talking Windows, not mac or Linux?