[Python] How do i compile a python code that uses pywebview into a single-file using nuitka

Discussão em 'Python' iniciado por Stack, Junho 22, 2025.

  1. Stack

    Stack Membro Participativo

    When i compile my code using Nuika using this command:

    nuitka --onefile --enable-plugin=tk-inter --windows-console-mode=disable ^
    --include-data-files=bg.jpg=bg.jpg ^
    --include-data-files=credentials.json=credentials.json ^
    --include-data-files=default-avatar.png=default-avatar.png ^
    --include-data-files=index.html=index.html ^
    --include-data-files=play.html=play.html ^
    --include-data-files=settings.html=settings.html ^
    --include-data-files=icon.png=icon.png ^
    --nofollow-import-to=tkinter.test ^
    --nofollow-import-to=webview.platforms.android ^
    --include-module=minecraft_launcher_lib ^
    --include-module=mcstatus ^
    --include-module=mods ^
    --include-module=requests ^
    --include-module=hashlib ^
    --windows-icon-from-ico=icon.png ^
    ui.py


    the compilation works but if i open the result file (ui.exe) in another directory other than the directory that it was compiled in it says: https://i.sstatic.net/tC6jPOWy.png

    Continue reading...

Compartilhe esta Página