pythonpyinstallerexecutableauto-py-to-exe

Pyinstaller generate EXE file outside dist folder


I'am using Pyinstaller package to build a python desktop app, however Pyinstaller seems to put the bundled exe file outside _internal folder is there a solution I can try ? Thanks in advance

output by Pyinstaller _internal folder structure

my goal is to package all the app in a folder (dist) that exe file must be inside _internal folder


Solution

  • From the update logs,on Pyinstaller's document:https://pyinstaller.org/en/stable/CHANGES.html#id2

    it says:

    Restructure onedir mode builds so that everything except the executable (and if you’re using external PYZ archive mode) are hidden inside a sub-directory. This sub-directory’s name defaults to but may be configured with a new --contents-directory option. Onefile applications and macOS bundles are unaffected. (#7713.pkg_internal.app)

    It means: from the verison ,6.0.0, it will build with a dir named _interne,when you choose to build by onedir.

    So,a simple way to go back,is , make the version no bigger than 6.0.0.such as 5.13.2. It works well for me.

    Also ,from the github issue.Below:

    https://github.com/pyinstaller/pyinstaller/pull/7713

    Pyinstall may give us a way to build exe file (use onedir),no create a dir named _interne.But,I can not find it.

    Sorry for that,English is not my mother tongue.I have tried my best to get the grammar correct.