Why Python EXE apps are often seen as viruses?

If you have been working with Python and you have compiled your apps into standalone EXE files, you most definitely encountered the situation where your apps have been seen as Trojan by your antivirus (if you have one) or by Windows Defender.

This is because a standalone EXE looks like a virus. Most viruses are compiled as EXE, therefore it is much more convenient to block anything that looks like a virus than not. It’s a matter of security and honestly, not so many people know how to write their own apps, so it makes sense to block everything. Better safe than sorry, right?

So how do you make sure if an EXE you downloaded is a virus or not?

The best way is to use the website VirusTotal. Before running that EXE, you can upload it there and it will analyze it against all anti-viruses out there telling you which of them would consider that EXE a virus.

Once the analysis is done and the EXE is seen as safe by most antiviruses, then it is safe to open it.

As for Windows Defender, that is a different story. Here is an example of a software developer having trouble with his own programs.

If you have trouble with Windows Defender and you are sure the EXE you’re trying to use is safe after using the website above, follow the instructions below (I’m providing two versions, depending of the Windows you’re using):

Version 1

  • Create a folder where you are going to save all standalone EXE apps you trust and use;
  • Search Windows Security in Windows settings;
  • Open Virus & threat protection;
  • Under Virus & threat protection settings heading click on Manage settings;
  • Click on Add or remove exclusions;
  • Under Files and folders heading, click on Exclude a folder;
  • Select the folder you created above and click on Exclude this folder.

Version 2

  • Create a folder where you are going to save all standalone EXE apps you trust and use;
  • Search for Windows Defender in Windows settings;
  • Under Exclusions heading, click on Add an exclusion;
  • Under Files and folders heading, click on Exclude a folder;
  • Select the folder you created above and click on Exclude this folder.

If you are still facing difficulties using EXE files because of antiviruses or Windows Defender, feel free to comment below or contact me using the Contact page.

Leave a Reply