I don't say it is best, but there are solutions like pyinstaller [0] to produce a binary from python code.

[0] https://pyinstaller.org/en/stable/

This just obfuscates the issue not actually fixes it. This is 1 binary + all the previously mentioned files.