[Python] How can i convert a Pyc file to Exe?

Discussão em 'Python' iniciado por Stack, Fevereiro 16, 2025.

  1. Stack

    Stack Membro Participativo

    I need to obfuscate my Python code, I know the best way would be to convert it to a C file but I can't do that.

    According to this article, although not 100% effective, I can "obfuscate" the code using:

    python -OO -m py_compile <filename.py>


    Doing this generates a PYC file, I tried to convert it to Exe using the Pyinstaller doing this:

    pyinstaller --onefile filename.pyc


    but it doesn't work, how can I then convert the obfuscated Pyc file to Exe? Is there any other way to obfuscate the code and then convert it to Exe without converting it to C language?

    Continue reading...

Compartilhe esta Página