Can Python be compiled to binary in any case?

I’m sorry I didn’t make my question clear, i mean a runable binary.

No, you don’t. A single zipapp works fine on any platform.

What does that mean? Protect your code against what and who?

There is a big difference between, say, “protect my code from accidental editing by my five year old little brother” and “prevent people from selling copies of my software”.

When it comes to “protecting your source code” remember that, at
least in the 181 countries which are party to the Berne Convention
treaty so far, your source code is automatically protected as your
own intellectual property through implicit international copyright.

Compiling to an executable form doesn’t really add any sort of
protection on its own, it’s akin to the concept of “security through
obscurity” (i.e. just because you don’t know how to decompile an
executable, that doesn’t mean the people you give copies to don’t

Use an obfuscator: 1, 2.