So I created a py and compiled it to exe by auto-py-to-exe and later my antivirus (Avira)
detected it as a virus which is not, to be cleared I know I can send false positive and that stuff to Avira lab but I just want to know for my future programs how should I encode or obfuscate (which software, package, or any suggestion) my program so after compiling to exe doesn't encounter this problem
I agree with Neo's response (May 3, 2021). Most info out there nowadays tries to offer workarounds but I find they don't work.  And it doesn't matter if you are able to reduce the false flag count down a bit as it just takes one or two counts to create a major headache for you...  This needs to be addressed by the python community.  If the py script file comes up clean and then you convert to exe and it is flagged, there is something with the compile/wrap that is the issue.  That exe conversion process needs to be fixed/addressed.
How to encode py program to not detected as a virus after compiling to exe?