I used pyinstaller to create exe file and sent it to some friends. it is harmless, but because it's --onefile the windows defender alert about it. the user need to allow permission to activate it, and it works. but with inconvenience. Any solution how to make sure windows defender won't alert about it from the start?
In PyInstaller it is easy to create one exe, By default both create a bunch of exes & dlls. In py2exe its easier to embed manifest file in exe, useful for run as administrator mode in windows vista and beyond. Pyinstaller is modular and has a feature of hooks to include files in the build that you like.
The most common reason a PyInstaller package fails is that PyInstaller failed to bundle a required file. Such missing files fall into a few categories: Hidden or missing imports: Sometimes PyInstaller can't detect the import of a package or library, typically because it is imported dynamically.
It is necessary to exclude from check from all PC using that program by the following procedure.
Add an exclusion to Windows Security
- Go to Start > Settings > Update & Security > Windows Security > Virus & threat protection.
- Under Virus & threat protection settings, select Manage settings, and then under Exclusions, select Add or remove exclusions.
- Select Add an exclusion, and then select from files, folders, file types, or process. The exclusion will apply to subfolders within a folder as well.
In Addition:
For example, searching with "pyinstaller virus" in StackOverflow will find many articles.
pyinstaller virus
It seems that there is a similar article just recently.
Windows Defender detecting Python EXE as Trojan
As mentioned in this article, it has already been reported to developers of pyinstaller. There are various introductions of alternative means other than pyinstaller.
Virus warnings after trying to run .py program converted to an .exe file
AVG (and other antiviruses) reports exe file as containing virus #603
Freezing Your Code
This is introduced in the article below. What is Nuitka
However, it seems that none of them is safe after all.
Py2Exe detected as virus. Alternatives?
There seems to be workaround to recompile PyInstaller's bootloader "runw.exe".
Program made with PyInstaller now seen as a Trojan Horse by AVG
how to recompile the bootloader of Pyinstaller
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With