I would like to share an issue that I came across with Python programs and Avast quarantining them. I have a couple of clients that have custom programs written in Python 3. The programs work fine without incident or Avast flagging until the programs are “compiled” or “packaged” using PyInstaller. After compiling and running the program, Avast regularly, but not always, flags the exe program file as a virus and removes it. White listing the program has no affect.
What I have discovered is that it is worse when the program resides on a network drive or shared folder on another machine as opposed to a local copy sitting on the local hard drive. The program works fine in interpretive mode (ie uncompiled). I also found out that what happens behind the scene with the packaged program is that it actually “uncompresses” a copy of the Python interpreter and its DLL’s when it is executed. This behavior, apparently, drives Avast “nuts” and it removes the program.
Here’s the solution that is working for me. The programs are now “compiled” using Nuitka instead of PyInstaller with the –standalone option. PyInstaller’s stand alone option for some reason couldn’t solve the issue for us, but Nuitka’s did. So far this has been working without Avast interfering.
I hope this helps keep others from spending days of effort getting around this issue! ![]()