Virus warnings after trying to run .py program converted to an .exe file

老子叫甜甜 提交于 2019-11-28 09:39:49

问题


I converted my .py file into an executable program and after trying to run it I got a virus alert from Avast that says that the program is infected with Win32:Malware-gen. The program works well when I disable Avast but that will not work in the long run. Also when I try to email the program through Gmail it blocks the attachment with another virus warning. The program is a simple python database made with tkinter.

Here is the code I used to convert it:

pyinstaller --onefile --windowed

Is there another code that I can use to convert it that would work better? Why do I get the alert?

Thank you


回答1:


This is a known issues and could be various reasons which makes your Virus Program think this is a virus.Check this out: https://github.com/pyinstaller/pyinstaller/issues/603

For now, your only other option would be to try out other converters like py2exe. Each have their own pros and cons, you can refer: https://docs.python-guide.org/shipping/freezing/ for a beautiful comparison of them all.




回答2:



Use the jar method

Basically, instead of converting your .py file(s) into an exe file, you instead convert it into a jar file.

Follow this answer:

https://stackoverflow.com/a/1255113/7123519

or

https://wiki.python.org/jython/JythonFaq/DistributingJythonScripts




来源:https://stackoverflow.com/questions/54156685/virus-warnings-after-trying-to-run-py-program-converted-to-an-exe-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!