尝试运行.py程序后将病毒警告转换为.exe文件 [英] Virus warnings after trying to run .py program converted to an .exe file
问题描述
我将.py文件转换为可执行程序,并在尝试运行它后从Avast收到了病毒警报,内容为该程序感染了Win32:Malware-gen. 当我禁用Avast时,该程序运行良好,但从长远来看将无法正常工作. 另外,当我尝试通过Gmail通过电子邮件发送程序时,它会通过另一个病毒警告阻止该附件. 该程序是使用tkinter制作的简单python数据库.
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
pyinstaller --onefile --windowed
是否还有另一个我可以用来转换它的代码可以更好地工作? 为什么我会收到警报?
Is there another code that I can use to convert it that would work better? Why do I get the alert?
谢谢
推荐答案
使用jar方法
基本上,您无需将.py文件转换为exe文件,而是将其转换为jar文件.
Use the jar method
Basically, instead of converting your .py file(s) into an exe file, you instead convert it into a jar file.
遵循此答案:
https://stackoverflow.com/a/1255113/7123519
或
https://wiki.python.org/jython/JythonFaq/DistributingJythonScripts
这篇关于尝试运行.py程序后将病毒警告转换为.exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!