Freeze (package) Python programs into stand-alone executables

Overview

PyInstaller Overview

PyInstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app without installing a Python interpreter or any modules.

Help keeping PyInstaller alive: Maintaining PyInstaller is a huge amount of work. PyInstaller development can only continue if users and companies provide sustainable funding. See http://www.pyinstaller.org/funding.html for how to support PyInstaller.

Documentation: https://pyinstaller.readthedocs.io/
Website: http://www.pyinstaller.org/
Code: https://github.com/pyinstaller/pyinstaller
Donate, Fund: http://www.pyinstaller.org/funding.html

PyInstaller reads a Python script written by you. It analyzes your code to discover every other module and library your script needs in order to execute. Then it collects copies of all those files -- including the active Python interpreter! -- and puts them with your script in a single folder, or optionally in a single executable file.

PyInstaller is tested against Windows, Mac OS X, and GNU/Linux. However, it is not a cross-compiler: to make a Windows app you run PyInstaller in Windows; to make a GNU/Linux app you run it in GNU/Linux, etc. PyInstaller has been used successfully with AIX, Solaris, FreeBSD and OpenBSD, but is not tested against them as part of the continuous integration tests.

Main Advantages

  • Works out-of-the-box with any Python version 3.6-3.9.
  • Fully multi-platform, and uses the OS support to load the dynamic libraries, thus ensuring full compatibility.
  • Correctly bundles the major Python packages such as numpy, PyQt5, PySide2, Django, wxPython, matplotlib and others out-of-the-box.
  • Compatible with many 3rd-party packages out-of-the-box. (All the required tricks to make external packages work are already integrated.)
  • Libraries like PyQt5, PySide2, wxPython, matplotlib or Django are fully supported, without having to handle plugins or external data files manually.
  • Works with code signing on OS X.
  • Bundles MS Visual C++ DLLs on Windows.

Installation

PyInstaller is available on PyPI. You can install it through pip:

pip install pyinstaller

Requirements and Tested Platforms

  • Python:
  • 3.6-3.9
  • tinyaes 1.0+ (only if using bytecode encryption). Instead of installing tinyaes, pip install pyinstaller[encryption] instead.
  • Windows (32bit/64bit):
  • PyInstaller should work on Windows 7 or newer, but we only officially support Windows 8+.
  • We don't support Python installed from the Windows store when not using virtual environments due to permission errors that can't easily be fixed.
  • GNU/Linux (32bit/64bit)
  • ldd: Console application to print the shared libraries required by each program or shared library. This typically can be found in the distribution-package glibc or libc-bin.
  • objdump: Console application to display information from object files. This typically can be found in the distribution-package binutils.
  • objcopy: Console application to copy and translate object files. This typically can be found in the distribution-package binutils, too.
  • Mac OS X (64bit):
  • Mac OS X 10.13 (High Sierra) or newer.

Usage

Basic usage is very simple, just run it against your main script:

pyinstaller /path/to/yourscript.py

For more details, see the manual.

Untested Platforms

The following platforms have been contributed and any feedback or enhancements on these are welcome.

  • FreeBSD
  • ldd
  • Solaris
  • ldd
  • objdump
  • AIX
  • AIX 6.1 or newer. PyInstaller will not work with statically linked Python libraries.
  • ldd
  • PowerPC GNU/Linux (Debian)

Before using any contributed platform, you need to build the PyInstaller bootloader, as we do not ship binary packages. Download PyInstaller source, and build the bootloader:

cd bootloader
python ./waf all

Then install PyInstaller:

python setup.py install

or simply use it directly from the source (pyinstaller.py).

Support

See http://www.pyinstaller.org/support.html for how to find help as well as for commercial support.

Funding

Maintaining PyInstaller is a huge amount of work. PyInstaller development can only continue if users and companies provide sustainable funding. See http://www.pyinstaller.org/funding.html for how to support PyInstaller.

Changes in this Release

You can find a detailed list of changes in this release in the change log section of the manual.

Comments
  • PyQt5 fix

    PyQt5 fix

    This pull request fixes and modernized the approach to deploying/packaging PyQt5 with Pyinstaller. Please provide feedback! The primary approach is explained in qt.py -- read the comments there.

    This works on Windows and Linux. Mac seems to work except for QtWebEngine. @tallforasmurf and any other Mac experts, please provide help! The latest Travis error is Could not find QtWebEngineProcess -- see hook-PyQt5.QtWebEngineWidgets.py, where I assume the following line is wrong:

    datas += [(os.path.join(q_library_info['DataPath'], 'lib', 'QtWebEngineCore.framework', 'Helpers', 'QtWebEngineProcess.app', 'Contents', 'MacOS', 'QtWebEngineProcess'), os.path.join('PyQt5', 'Qt', 'lib', 'QtWebEngineCore.framework', 'Helpers', 'QtWebEngineProcess.app', 'Contents', 'MacOS')),]

    area:hooks area:hooks/PyQt5 
    opened by bjones1 179
  • Module Import Ordering Preserved

    Module Import Ordering Preserved

    This pull request preserves the order in which modules are imported by the user application. Because that is both needful and good.

    Specifically, a new public lib.modulegraph.modulegraph.Node.order attribute – guaranteed to monotonically increase on every module importation and hence provide a reliable means of comparing importation order – is added. (Tested and working, you may be sure.)

    This low-level machinery partially fixes #1367. Hooks may now test the order in which two hypothetical modules foo and bar were initially imported as follows:

    from PyInstaller.utils.hooks.hookutils import logger
    
    def hook(mod):
        if mod.graph.findNode('foo').order < mod.graph.findNode('bar').order:
            logger.debug('Module "foo" imported before module "bar". Why? I dunno.')
        else:
            logger.debug('Module "bar" imported before module "foo". Suck it, you.')
    
        return mod
    

    What About #1367? Why You No Fix, Huh?

    Would someone (...hey, no names: @htgoebel) mind posting a minimal-length example (MLE) demonstrating the exact issue of #1367?

    While I do have the Python 2 version of wxPython locally installed, I'm unsure how to properly replicate this issue. I know; it's probably trivial. I'm feeble-brained, but hard-working. As soon as I get an MLE, I'll append a commit to this pull request fixing #1367 in entirety.

    What Else? There's Always Something Else

    wxPython's Python 2 version (referred to as "Classic") and Python 3 version (referred to as "Phoenix") appear to be very dissimilar – to the point of actually being different projects that confusingly share the same name. Our import hooks should probably account for these differences in ways I cannot possibly fathom.

    Thus spaketh Walt.

    @high Python:3 area:modulegraph 
    opened by leycec 95
  • PyInstaller and Apple Silicon?

    PyInstaller and Apple Silicon?

    Apple just unveiled their M1 chip yesterday and that got me thinking about the impact it will have on PyInstaller and the apps packaged with it.

    Will this require a complete rewrite of the way PyInstaller functions or there's an alternative to it.

    feature platform:OS X 
    opened by harshithdwivedi 93
  • Feature: Splash screen based on Tcl/Tk

    Feature: Splash screen based on Tcl/Tk

    Edit: Note

    This pull request does not include a compiled version of the bootloader. If you want to test this PR, you have to recompile the bootloader. Please follow the instructions in the official PyInstaller documentation here. Please make sure that you build for your architecture (64- or 32bit). To test the recompiled bootloader and this feature, please run the automatic test, instructions can be found here. The test is called test_pyi_splash

    If you are running a splashscreen-enable bootloader and have bundled resources for it (i.e. you have used a Splash build target), you should see a message similar to SPLASH: Found splash screen resources. in the console of the bootloader. If you do not see such a message, please confirm that you have compiled the correct bootloader and used the Splash build target accordingly. Details on how to use this feature can be found in the documentation, which you also need to recompile. To compile the documentation, please follow these instructions.


    Original post

    So, following on #4581 now a new implementation of the splash screen based on Tcl/Tk (the same library that tkinter uses). The idea of the splash screen came from #4354.

    This change implements a splash screen based on Tcl/Tk, which is bundled by PyInstaller at compile time. The splash screen is now (unlike #4581) able to show the progress when unpacking a one-file archive.

    The bootloader extracts the necessary files in onefile mode and starts a minimal Tcl/Tk environment in which a script is executed that starts the splash screen. Although this feature is platform independent, I have only tested it on Windows.

    For the communication between Python and the splash screen the pyi_splash Python module is (again) bundled as fake modules. This has not changed much compared to #4581.

    Of course I will add documentation/changelog in the next days and squash/reword the commits.

    feature state:needs more work area:bootloader area:hooks 
    opened by Chrisg2000 92
  • multiprocessing spawn in python 3 does not work on macOS

    multiprocessing spawn in python 3 does not work on macOS

    I'm not able to get multiprocessing to work in spawn mode on macOS when using pyinstaller. The following script runs fine in the interpreter, but when using pyinstaller it enters an infinite recursive loop that keeps starting new processes.

    I'm using Python 3 from Anaconda (Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12) ), on macOS 10.12.2, with the development version of pyinstaller (3.3.dev0+483c819).

    import sys
    from multiprocessing import freeze_support, set_start_method, Process
    
    def test():
        print('In subprocess')
    
    if __name__ == '__main__':
        print(sys.argv,)
        freeze_support()
        set_start_method('spawn')
    
        print('In main')
        proc = Process(target=test)
        proc.start()
        proc.join()
    
    platform:OS X 
    opened by simongus 85
  • Universal CRT not found building with Py3.5 on Win10 (Python 3.5 not usable on Windows)

    Universal CRT not found building with Py3.5 on Win10 (Python 3.5 not usable on Windows)

    PyInstaller: 3.0.dev8 Python: 3.5.0 64bit Platform: Windows-10.0.10240

    Freezing any code in this environment output some warnings: https://gist.githubusercontent.com/AcidWeb/aa423c3f402cb86f1806/raw/d0bc853ffe262a4dfccef9febf0fac0b086aa458/gistfile1.txt

    This is output of pyinstaller test.py where test.py is empty file(!).

    @high platform:Windows area:bootloader 
    opened by AcidWeb 85
  • PyInstaller not installing with pip on Python3.8 and latest MSYS2 in Windows

    PyInstaller not installing with pip on Python3.8 and latest MSYS2 in Windows

    Download latest version of MSYS2: http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20200629.exe

    After install, in an MSYS2 shell (not MinGW) neither of the following work: (1) pacman -S python3-pip pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

    (2) pacman -S mingw-w64-x86_64-python-pip pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

    Both fail at the install with the following error:

    ERROR: Command errored out with exit status 1: command: /usr/bin/python3.exe /usr/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp_ucc0221 cwd: /tmp/pip-req-build-ls4kydx6 Complete output (4 lines): running bdist_wheel running build running build_bootloader Your platform is not yet supported. Please define constant PYDYLIB_NAMES for your platform.

    ERROR: Failed building wheel for pyinstaller Failed to build pyinstaller ERROR: Could not build wheels for pyinstaller which use PEP 517 and cannot be installed directly

    This is the exact same issue as the one below answered by Dan Yeaw: https://github.com/pyinstaller/pyinstaller/issues/4570

    And according to him, PyInstaller should work on Python3.8: https://stackoverflow.com/questions/54728231/how-to-fix-pyinstaller-in-msys2-mingw-your-platform-is-not-yet-supported

    Am I missing something...?

    @low platform:Windows platform:Other OS pull-request wanted bug 
    opened by LeighKorbel 83
  • minimalistic PyQt 5.6.0 project

    minimalistic PyQt 5.6.0 project "could not find or load the Qt platform plugin "windows""

    latest Anaconda 2 64bit (4.4.0) python 2.7.13 PyQt 5.6.0 pyinstaller 3.4.dev0+g162fe92d

    When I try to freeze this minimalized example with pyinstaller:

    from PyQt5 import QtWidgets
    import sys
    if __name__ == "__main__":
        app = QtWidgets.QApplication(sys.argv)
        print 'app loaded'
    

    The resulting executable is throwing

    This application failed to start because it could not find or load the Qt platform plugin "windows"
    in "".
    

    In the DIST Folder PyInstaller is in fact providing the Qt dlls:

    ...\DIST\minimalized\PYQT5
    └───Qt
        └───plugins
            ├───iconengines
            │       qsvgicon.dll
            │
            ├───imageformats
            │       qdds.dll
            │       qgif.dll
            │       qicns.dll
            │       qico.dll
            │       qjpeg.dll
            │       qsvg.dll
            │       qtga.dll
            │       qtiff.dll
            │       qwbmp.dll
            │       qwebp.dll
            │
            ├───platforms
            │       qminimal.dll
            │       qoffscreen.dll
            │       qwindows.dll
            │
            └───printsupport
                    windowsprintersupport.dll
    

    As far as I can tell, Qt is looking for the libaries at some default paths, rather than in the provided directory. When I add anacondas qt.conf (located at C:\ProgramData\Anaconda2) in the spec file as external file the program is running correctly. The content of the spec file is

    [Paths]
    Prefix = C:/ProgramData/Anaconda2/Library
    Binaries = C:/ProgramData/Anaconda2/Library/bin
    Libraries = C:/ProgramData/Anaconda2/Library/lib
    Headers = C:/ProgramData/Anaconda2/Library/include/qt
    

    As this file is system specific the resulting exe is not really stand alone. As there is no 1:1 mapping from the present PyQt5 path to the folders in the...\Libary\ path how does a system independend qt.conf file look like? And shouldn't the hook file for PyQt create the qt.conf automatically? Thanks for your support!

    solution:duplicate area:hooks area:hooks/PyQt5 
    opened by user-na 72
  • MAC OS X: Tkinter import doesn't copy Tcl and TK

    MAC OS X: Tkinter import doesn't copy Tcl and TK

    On mac PyInstaller doesn't seem to copy Tcl and Tk once both are copied to the folder the error is gone.

    module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
    ImportError: dlopen(_tkinter.so, 2): Library not loaded: @loader_path/Tcl
      Referenced from: _tkinter.so
      Reason: image not found
    
    platform:OS X @medium pull-request wanted 
    opened by wahid 68
  • TypeError: an integer is required (got type bytes) when compiling any script

    TypeError: an integer is required (got type bytes) when compiling any script

    When i compile any script using pyinstaller i get TypeError: an integer is required (got type bytes)

    i tried both with and without UPX, still the same error, i even tried installing the latest dev builds and it's still the same error.

    Here's the log:

    PS C:\Users\sl4v\Desktop\Projects\wikia-download-gui> py -m PyInstaller .\wikia_dl_gui.py --debug=all
    104 INFO: PyInstaller: 3.5.dev0+0cbe7fba3
    104 INFO: Python: 3.8.0b1
    106 INFO: Platform: Windows-10-10.0.17134-SP0
    113 INFO: wrote C:\Users\sl4v\Desktop\Projects\wikia-download-gui\wikia_dl_gui.spec
    116 INFO: UPX is not available.
    118 INFO: Extending PYTHONPATH with paths
    ['C:\\Users\\sl4v\\Desktop\\Projects\\wikia-download-gui',
     'C:\\Users\\sl4v\\Desktop\\Projects\\wikia-download-gui']
    119 INFO: checking Analysis
    267 INFO: checking PYZ
    267 INFO: Building PYZ because PYZ-00.toc is non existent
    268 INFO: Building PYZ (ZlibArchive) C:\Users\sl4v\Desktop\Projects\wikia-download-gui\build\wikia_dl_gui\PYZ-00.pyz
    Traceback (most recent call last):
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\__main__.py", line 118, in <module>
        run()
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\__main__.py", line 111, in run
        run_build(pyi_config, spec_file, **vars(args))
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
        PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main
        build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
        exec(code, spec_namespace)
      File "C:\Users\sl4v\Desktop\Projects\wikia-download-gui\wikia_dl_gui.spec", line 18, in <module>
        pyz = PYZ(a.pure, a.zipped_data,
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__
        self.__postinit__()
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
        self.assemble()
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble
        self.code_dict = {
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\api.py", line 129, in <dictcomp>
        key: strip_paths_in_code(code)
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\utils.py", line 652, in strip_paths_in_code
        consts = tuple(
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\utils.py", line 653, in <genexpr>
        strip_paths_in_code(const_co, new_filename)
      File "C:\Users\sl4v\AppData\Local\Programs\Python\Python38\lib\site-packages\PyInstaller\building\utils.py", line 660, in strip_paths_in_code
        return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
    TypeError: an integer is required (got type bytes)
    
    solution:invalid 
    opened by meatyite 59
  • Support for ARM

    Support for ARM

    Hi,

    Im trying build for Raspberry PI 3.

    But im getting this error:

    Fatal error: PyInstaller does not include a pre-compiled bootloader for your
    platform. For more details and instructions how to build the bootloader see
    <https://pyinstaller.readthedocs.io/en/stable/bootloader-building.html>
    

    There is any bootloader that work om armv7 and armv8?

    Thanks.

    feature 
    opened by paulocoutinhox 55
  • PySide6 6.4.1 app periodically hangs straight after launch on macOS Ventura 13.0.1

    PySide6 6.4.1 app periodically hangs straight after launch on macOS Ventura 13.0.1

    Description of the issue

    My PySide6-based app will periodically hang straight after launch on macOS Ventura 13.0.1. It doesn't happen every time - probably 1 in 10 or so launches hang. When I run the code unfrozen, it never hangs. I've reproduced the bug using a really minimal example below: just displaying a single message dialog.

    Context information (for bug reports)

    • Output of pyinstaller --version: 5.7.0

    • Version of Python: Python 3.10.9 (v3.10.9:1dd9be6584, Dec 6 2022, 14:37:36) [Clang 13.0.0 (clang-1300.0.29.30)]

    • Platform: macOS Ventura 13.0.1

    • How you installed Python: From python.org (macOS 64-bit universal2 installer)

    • Did you also try this on another platform? Does it work there? Haven't tried yet.

    • try the latest development version: Tried latest devel version - hangs still occur.

      • [x] start with clean installation
      • [x] use the latest development version
      • [x] Run your frozen program from a command window (shell) — instead of double-clicking on it

    When I run the frozen app from the command line (./dist/HangTest.app/Contents/MacOS/HangTest) it never seems to hang. The hang only occurs when launched from the Finder.

    • [x] Package your program in --onedir mode
    • [x] Package without UPX, say: use the option --noupx or set upx=False in your .spec-file
    • [x] Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.

    A minimal example program which shows the error

    hang_test.py

    from PySide6 import QtCore, QtWidgets
    from PySide6.QtCore import Qt
    
    
    def main():
        app = QtWidgets.QApplication()
        QtWidgets.QMessageBox.information(None, "Test", "Hello World!")
    
    
    if __name__ == "__main__":
        main()
    

    hang_test.spec

    # -*- mode: python ; coding: utf-8 -*-
    
    
    #
    # Set various parameters
    #
    app_version = "0.1.0"
    onefile = False
    block_cipher = None
    
    
    #
    # Main spec file elements
    #
    a = Analysis(['hang_test.py'],
            binaries=[],
            datas=[],
            hiddenimports=[],
            hookspath=[],
            runtime_hooks=[],
            excludes=[],
            win_no_prefer_redirects=False,
            win_private_assemblies=False,
            cipher=block_cipher,
            noarchive=False
        )
    
    pyz = PYZ(a.pure, a.zipped_data,
                cipher=block_cipher)
    
    exe = EXE(pyz,
            a.scripts,
            a.binaries if onefile else [],
            a.zipfiles if onefile else [],
            a.datas if onefile else [],
            exclude_binaries=not onefile,
            name='HangTest',
            debug=True,
            bootloader_ignore_signals=False,
            strip=False,
            upx=False,
            upx_exclude=[],
            runtime_tmpdir=None,
            console=False,
            disable_windowed_traceback=False,
            argv_emulation=True,
            target_arch='universal2',
            codesign_identity=None,
            entitlements_file=None,
        )
    bundle_obj = exe
    
    if not onefile:
        coll = COLLECT(
                exe,
                a.binaries,
                a.zipfiles,
                a.datas,
                strip=False,
                upx=True,
                upx_exclude=[],
                name='HangTest',
            )
        bundle_obj = coll
    
    app = BUNDLE(bundle_obj,
            name='HangTest.app',
            bundle_identifier="app.hangtest",
            info_plist={
                'CFBundleShortVersionString': app_version,
            }
        )
    

    Stacktrace / full error message

    Diagnostic Report with stacktrace attached: HangTest_2022-12-27-225244.hang.txt

    triage 
    opened by jamesbcd 6
  • Error when building the package `tensorflow-cpu` and `tensorflow-directml-plugin`

    Error when building the package `tensorflow-cpu` and `tensorflow-directml-plugin`

    System:

    • OS: Windows 10 Pro
    • Python: 3.9.15
    • tensorflow-cpu: 2.10.0
    • tensorflow-directml-plugin: latest
    • pyinstaller: latest (from develop branch)

    Error:

    Traceback (most recent call last):
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 621, in collect_submodules
        modules, subpackages, on_error = isolated_python.call(_collect_submodules, name, on_error)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\isolated\_parent.py", line 302, in call
        ok, output = loads(b64decode(self._read_handle.readline()))
    EOFError: EOF read where object expected
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<PATH>\anaconda3\envs\direct_ml\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "<PATH>\anaconda3\envs\direct_ml\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "<PATH>\anaconda3\envs\direct_ml\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\__main__.py", line 194, in _console_script_run
        run()
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\__main__.py", line 180, in run
        run_build(pyi_config, spec_file, **vars(args))
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\__main__.py", line 61, in run_build
        PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\build_main.py", line 972, in main
        build(specfile, distpath, workpath, clean_build)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\build_main.py", line 894, in build
        exec(code, spec_namespace)
      File "gpu_test.spec", line 6, in <module>
        a = Analysis(
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\build_main.py", line 411, in __init__
        self.__postinit__()
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\datastruct.py", line 173, in __postinit__
        self.assemble()
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\build_main.py", line 574, in assemble
        priority_scripts.append(self.graph.add_script(script))
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 269, in add_script
        self._top_script_node = super().add_script(pathname)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1433, in add_script
        self._process_imports(n)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
        target_modules = self._safe_import_hook(*import_info, **kwargs)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 382, in _safe_import_hook
        return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
        target_modules = self.import_hook(
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook
        target_package, target_module_partname = self._find_head_package(
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package
        target_package = self._safe_import_module(
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 429, in _safe_import_module
        return super()._safe_import_module(module_basename, module_name, parent_package)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
        self._process_imports(n)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
        target_modules = self._safe_import_hook(*import_info, **kwargs)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 369, in _safe_import_hook
        excluded_imports = self._find_all_excluded_imports(source_module.identifier)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 357, in _find_all_excluded_imports
        excluded_imports.update(module_hook.excludedimports)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\imphook.py", line 320, in __getattr__
        self._load_hook_module()
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\imphook.py", line 387, in _load_hook_module
        self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\compat.py", line 612, in importlib_load_source
        return mod_loader.load_module()
      File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
      File "<frozen importlib._bootstrap_external>", line 1029, in load_module
      File "<frozen importlib._bootstrap_external>", line 854, in load_module
      File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
      File "<frozen importlib._bootstrap>", line 711, in _load
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-tensorflow.py", line 66, in <module>
        hiddenimports = collect_submodules('tensorflow',
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 629, in collect_submodules
        todo.append(subpackage_name)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\isolated\_parent.py", line 244, in __exit__
        self._write_handle.flush()
    OSError: [Errno 22] Invalid argument
    Traceback (most recent call last):
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 621, in collect_submodules
        modules, subpackages, on_error = isolated_python.call(_collect_submodules, name, on_error)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\isolated\_parent.py", line 302, in call
        ok, output = loads(b64decode(self._read_handle.readline()))
    EOFError: EOF read where object expected
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<PATH>\anaconda3\envs\direct_ml\lib\runpy.py", line 197, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "<PATH>\anaconda3\envs\direct_ml\lib\runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "<PATH>\anaconda3\envs\direct_ml\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\__main__.py", line 194, in _console_script_run
        run()
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\__main__.py", line 180, in run
        run_build(pyi_config, spec_file, **vars(args))
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\__main__.py", line 61, in run_build
        PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\build_main.py", line 972, in main
        build(specfile, distpath, workpath, clean_build)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\build_main.py", line 894, in build
        exec(code, spec_namespace)
      File "gpu_test.spec", line 6, in <module>
        a = Analysis(
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\build_main.py", line 411, in __init__
        self.__postinit__()
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\datastruct.py", line 173, in __postinit__
        self.assemble()
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\building\build_main.py", line 574, in assemble
        priority_scripts.append(self.graph.add_script(script))
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 269, in add_script
        self._top_script_node = super().add_script(pathname)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1433, in add_script
        self._process_imports(n)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
        target_modules = self._safe_import_hook(*import_info, **kwargs)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 382, in _safe_import_hook
        return super()._safe_import_hook(target_module_partname, source_module, target_attr_names, level, edge_attr)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
        target_modules = self.import_hook(
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook
        target_package, target_module_partname = self._find_head_package(
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package
        target_package = self._safe_import_module(
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 429, in _safe_import_module
        return super()._safe_import_module(module_basename, module_name, parent_package)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
        self._process_imports(n)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
        target_modules = self._safe_import_hook(*import_info, **kwargs)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 369, in _safe_import_hook
        excluded_imports = self._find_all_excluded_imports(source_module.identifier)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\analysis.py", line 357, in _find_all_excluded_imports
        excluded_imports.update(module_hook.excludedimports)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\imphook.py", line 320, in __getattr__
        self._load_hook_module()
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\depend\imphook.py", line 387, in _load_hook_module
        self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\compat.py", line 612, in importlib_load_source
        return mod_loader.load_module()
      File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
      File "<frozen importlib._bootstrap_external>", line 1029, in load_module
      File "<frozen importlib._bootstrap_external>", line 854, in load_module
      File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
      File "<frozen importlib._bootstrap>", line 711, in _load
      File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 850, in exec_module
      File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-tensorflow.py", line 66, in <module>
        hiddenimports = collect_submodules('tensorflow',
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\utils\hooks\__init__.py", line 629, in collect_submodules
        todo.append(subpackage_name)
      File "<PATH>\anaconda3\envs\direct_ml\lib\site-packages\PyInstaller\isolated\_parent.py", line 244, in __exit__
        self._write_handle.flush()
    OSError: [Errno 22] Invalid argument
    

    All dependencies log.txt main.spec

    bug 
    opened by Neizvestnyj 9
  • Specifying `codesign_identity` Causes the Installer to Crash

    Specifying `codesign_identity` Causes the Installer to Crash

    Description of the issue

    When sending codesign_identity=None to the EXE command, the installer builds and runs fine. When I change the line to codesign_identity="MYCODESIGNIDENTITY", where MYCODESIGNIDENTITY equals the output of security find-identity -v -p codesigning, the build still runs fine, but I get the following output:

    rosetta error: /var/db/oah/917482492ec43b48e06e350e9a9aa4e60ce7dd6ad9ad94c6222af10b1e1b9aef/96ed8dde1118dc8c7862ddcc233351816dc66939a23ae532bcfaa54b2f39d3b7/libffi.7.dylib.aot: unable to mmap __TEXT: 1
    [1]    21337 trace trap  dist/OpenBBTerminal/OpenBBTerminal
    

    Context information (for bug reports)

    • Output of pyinstaller --version: 5.7.0

    • Version of Python: 3.9.6

    • Platform: macOS: Ventura 13.0.1

    • How you installed Python: onda

    • Did you also try this on another platform? Does it work there? N/A

    • try the latest development version, using the following command:

    pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
    
    • follow all the instructions in our "If Things Go Wrong" Guide (https://github.com/pyinstaller/pyinstaller/wiki/If-Things-Go-Wrong) and

    Make sure everything is packaged correctly

    • [x] start with clean installation
    • [x] use the latest development version
    • [x] Run your frozen program from a command window (shell) — instead of double-clicking on it
    • [x] Package your program in --onedir mode
    • [x] Package without UPX, say: use the option --noupx or set upx=False in your .spec-file
    • [x] Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.

    A minimal example program which shows the error

    (paste text here)
    “Minimal“ means: remove everything from your code which is not relevant for this bug,
    esp. don't use external programs, remote requests, etc.
    A very good example is https://gist.github.com/ronen/024cdae9ff2d50488438. This one helped
    us reproducing and fixing a quite complex problem within approx 1 hour.
    
    triage 
    opened by colin99d 6
  • Conflict between module and app name (macos)

    Conflict between module and app name (macos)

    Description of the issue

    Our project is trying to move our data files into our module and pyinstaller fails to do handle this on macos because our --name is the same as our one and only module. When I run pyinstaller, I pass --name Foo --add-data=foo/datadir:foo and pyinstaller fails because it has already created Foo in the dist bundle:

    Pyinstaller needs to make a directory at '/Users/me/Documents/foo.git/dist/Foo/foo', but there already exists a file at that path!
    

    (If MacOS wasn't case-sensitive, this likely would work because of the capitalization of the app name, but alas)

    I've also tried --add-data=foo:foo to add the whole module, but the same problem exists, although the error is slightly different (see below in the stacktrace section).

    We are trying to "be good" and use importlib-resources in our app to find the data files by module:

    with importlib_resources.as_file(
                importlib_resources.files('foo.datadir')
                .joinpath('datafile')
            ) as d:
    

    I can get data files into the bundle just fine by doing:

    --add-data=foo/datadir:datadir
    

    ...but importlib won't find them there because of the foo. module scoping.

    It seems to me (not knowing much about MacOS app requirements) that these files should be able to go into Resources and importlib should be taught to find them there so that we don't have this conflict. If I mangle the --name I pass to pyinstaller, then it works because there is no conflict, but then my app's "name" in the title bar, app menu, etc is wrong, which is very unfortunate.

    If there's something else I can do to work around this that doesn't involve mangling the app name or restructuring out project substantially that would be great. At this point, it seems like I will have to do "importlib.resources or find relative to _ _ file _ _" in our code.

    Context information (for bug reports)

    • Output of pyinstaller --version: 5.7.0 (also tried from develop.zip per template)
    • Version of Python: 3.10.8 (but also repro'd on 3.8
    • Platform: MacOS (Monterey and Big Sur)
    • How you installed Python: Both platform-provided and brew, same difference
    • Did you also try this on another platform? Does it work there? MacOS-specific

    Make sure everything is packaged correctly

    • [ X ] start with clean installation
    • [ X ] use the latest development version
    • [ X ] Run your frozen program from a command window (shell) — instead of double-clicking on it
    • [ X ] Package your program in --onedir mode
    • [ N/A ] Package without UPX, say: use the option --noupx or set upx=False in your .spec-file
    • [ N/A ] Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.

    A minimal example program which shows the error

    It would need to be a multi-file tree to reproduce this. I could do it, if necessary but I think it's probably clear. Our directory structure looks like this:

    project/
      foo.py
      foo/
        somecode1.py
        somecode2.py
        drivers/
          morecode.py
        datadir/
            datafile
    

    And I'm calling pyinstaller like:

    pyinstaller --name Foo --add-data=foo/datadir:foo foo.py
    

    Stacktrace / full error message

    If I do --add-data=foo/datadir:foo I get this:

    Pyinstaller needs to make a directory at '/Users/me/Documents/foo.git/dist/Foo/foo', but there already exists a file at that path!
    

    If I do --add-data=foo:foo I get this:

    Traceback (most recent call last):
      File "/opt/homebrew/bin/pyinstaller", line 8, in <module>
        sys.exit(_console_script_run())
      File "/opt/homebrew/lib/python3.10/site-packages/PyInstaller/__main__.py", line 194, in _console_script_run
        run()
      File "/opt/homebrew/lib/python3.10/site-packages/PyInstaller/__main__.py", line 180, in run
        run_build(pyi_config, spec_file, **vars(args))
      File "/opt/homebrew/lib/python3.10/site-packages/PyInstaller/__main__.py", line 61, in run_build
        PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
      File "/opt/homebrew/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 971, in main
        build(specfile, distpath, workpath, clean_build)
      File "/opt/homebrew/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 893, in build
        exec(code, spec_namespace)
      File "/Users/me/Documents/foo.git/Foo.spec", line 41, in <module>
        coll = COLLECT(
      File "/opt/homebrew/lib/python3.10/site-packages/PyInstaller/building/api.py", line 892, in __init__
        self.__postinit__()
      File "/opt/homebrew/lib/python3.10/site-packages/PyInstaller/building/datastruct.py", line 173, in __postinit__
        self.assemble()
      File "/opt/homebrew/lib/python3.10/site-packages/PyInstaller/building/api.py", line 926, in assemble
        os.makedirs(todir)
      File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/os.py", line 215, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/os.py", line 225, in makedirs
        mkdir(name, mode)
    NotADirectoryError: [Errno 20] Not a directory: '/Users/me/Documents/foo.git/dist/Foo/foo/drivers'
    
    triage 
    opened by kk7ds 14
  • Importing PySide6.QtQml results in ImportError when running frozen app

    Importing PySide6.QtQml results in ImportError when running frozen app

    When application includes the following import:

    import PySide6.QtQml

    Running the frozen application results in the following runtime error:

    ImportError: libpyside6qml.abi3.so.6.4: cannot open shared object file: No such file or directory

    Context information

    • Output of pyinstaller --version: 5.6.1
    • Version of Python: 3.10.6
    • Platform: Ubuntu 22.04.1, 5.15.0-52-generic
    • How you installed Python: apt (included in distro
    • Did you also try this on another platform? No
    • Latest dev version: Yes, downloaded and tried today, same result

    Make sure everything is packaged correctly

    • [x] start with clean installation
    • [x] use the latest development version
    • [x] Run your frozen program from a command window (shell) — instead of double-clicking on it
    • [x] Package your program in --onedir mode
    • [x] Package without UPX, say: use the option --noupx or set upx=False in your .spec-file
    • [x] Repackage you application in verbose/debug mode. For this, pass the option --debug to pyi-makespec or pyinstaller or use EXE(..., debug=1, ...) in your .spec file.

    A minimal example program which shows the error

    import PySide6.QtQml   # just this one line is needed to reproduce
    

    Stacktrace / full error message

    import _frozen_importlib # frozen
    import _imp # builtin
    import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
    import '_warnings' # <class '_frozen_importlib.BuiltinImporter'>
    import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
    import '_io' # <class '_frozen_importlib.BuiltinImporter'>
    import 'marshal' # <class '_frozen_importlib.BuiltinImporter'>
    import 'posix' # <class '_frozen_importlib.BuiltinImporter'>
    import '_frozen_importlib_external' # <class '_frozen_importlib.FrozenImporter'>
    # installing zipimport hook
    import 'time' # <class '_frozen_importlib.BuiltinImporter'>
    import 'zipimport' # <class '_frozen_importlib.FrozenImporter'>
    # installed zipimport hook
    # zipimport: found 161 names in '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip'
    import '_codecs' # <class '_frozen_importlib.BuiltinImporter'>
    import 'codecs' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'encodings.aliases' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/encodings/">
    import 'encodings' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'encodings.utf_8' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/encodings/">
    import '_signal' # <class '_frozen_importlib.BuiltinImporter'>
    import '_abc' # <class '_frozen_importlib.BuiltinImporter'>
    import 'abc' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'io' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import '_struct' # <class '_frozen_importlib.BuiltinImporter'>
    import 'zlib' # <class '_frozen_importlib.BuiltinImporter'>
    import '_stat' # <class '_frozen_importlib.BuiltinImporter'>
    import 'stat' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import '_collections_abc' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'genericpath' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'posixpath' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'os' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'types' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'enum' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import '_sre' # <class '_frozen_importlib.BuiltinImporter'>
    import 'sre_constants' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'sre_parse' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'sre_compile' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'itertools' # <class '_frozen_importlib.BuiltinImporter'>
    import 'keyword' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import '_operator' # <class '_frozen_importlib.BuiltinImporter'>
    import 'operator' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'reprlib' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import '_collections' # <class '_frozen_importlib.BuiltinImporter'>
    import 'collections' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import '_functools' # <class '_frozen_importlib.BuiltinImporter'>
    import 'functools' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
    import 'copyreg' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 're' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'fnmatch' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'ntpath' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'warnings' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'errno' # <class '_frozen_importlib.BuiltinImporter'>
    import 'urllib' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'urllib.parse' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/urllib/">
    import 'pathlib' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'token' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'tokenize' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    # PyInstaller: FrozenImporter(/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/test?65843)
    # ctypes not found in PYZ
    import inspect # PyInstaller PYZ
    import ast # PyInstaller PYZ
    import '_ast' # <class '_frozen_importlib.BuiltinImporter'>
    import contextlib # PyInstaller PYZ
    import 'contextlib' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'ast' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import dis # PyInstaller PYZ
    import opcode # PyInstaller PYZ
    # _opcode not found in PYZ
    # extension module '_opcode' loaded from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/lib-dynload/_opcode.cpython-310-x86_64-linux-gnu.so'
    # extension module '_opcode' executed from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/lib-dynload/_opcode.cpython-310-x86_64-linux-gnu.so'
    import '_opcode' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7fb4a921a290>
    import 'opcode' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'dis' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    # collections.abc not found in PYZ
    import 'collections.abc' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/collections/">
    import importlib # PyInstaller PYZ
    import 'importlib' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import importlib.machinery as importlib.machinery # PyInstaller PYZ (__path__ override: importlib)
    import 'importlib.machinery' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    # linecache not found in PYZ
    import 'linecache' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'inspect' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import subprocess # PyInstaller PYZ
    import signal # PyInstaller PYZ
    import 'signal' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import threading # PyInstaller PYZ
    # _weakrefset not found in PYZ
    import '_weakrefset' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'threading' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'fcntl' # <class '_frozen_importlib.BuiltinImporter'>
    # msvcrt not found in PYZ
    import '_posixsubprocess' # <class '_frozen_importlib.BuiltinImporter'>
    import 'select' # <class '_frozen_importlib.BuiltinImporter'>
    import selectors # PyInstaller PYZ
    import 'math' # <class '_frozen_importlib.BuiltinImporter'>
    import 'selectors' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'subprocess' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import PySide6 # PyInstaller PYZ
    import textwrap # PyInstaller PYZ
    import 'textwrap' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import shiboken6 # PyInstaller PYZ
    import zipfile # PyInstaller PYZ
    import 'binascii' # <class '_frozen_importlib.BuiltinImporter'>
    import importlib.util as importlib.util # PyInstaller PYZ (__path__ override: importlib)
    import importlib._abc as importlib._abc # PyInstaller PYZ (__path__ override: importlib)
    import 'importlib._abc' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'importlib.util' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import shutil # PyInstaller PYZ
    import bz2 # PyInstaller PYZ
    import _compression # PyInstaller PYZ
    import '_compression' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    # _bz2 not found in PYZ
    # extension module '_bz2' loaded from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/lib-dynload/_bz2.cpython-310-x86_64-linux-gnu.so'
    # extension module '_bz2' executed from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/lib-dynload/_bz2.cpython-310-x86_64-linux-gnu.so'
    import '_bz2' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7fb4a92d2e60>
    import 'bz2' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import lzma # PyInstaller PYZ
    # _lzma not found in PYZ
    # extension module '_lzma' loaded from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/lib-dynload/_lzma.cpython-310-x86_64-linux-gnu.so'
    # extension module '_lzma' executed from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/lib-dynload/_lzma.cpython-310-x86_64-linux-gnu.so'
    import '_lzma' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7fb4a92d34c0>
    import 'lzma' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'shutil' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'zipfile' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import base64 # PyInstaller PYZ
    import 'base64' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    # traceback not found in PYZ
    import 'traceback' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import tempfile # PyInstaller PYZ
    import random # PyInstaller PYZ
    import bisect # PyInstaller PYZ
    import '_bisect' # <class '_frozen_importlib.BuiltinImporter'>
    import 'bisect' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import '_random' # <class '_frozen_importlib.BuiltinImporter'>
    import '_sha512' # <class '_frozen_importlib.BuiltinImporter'>
    import 'random' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    # weakref not found in PYZ
    import 'weakref' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/">
    import 'tempfile' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import typing # PyInstaller PYZ
    import 'typing' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    # shiboken6.Shiboken not found in PYZ
    # numpy not found in PYZ
    import 'xxsubtype' # <class '_frozen_importlib.BuiltinImporter'>
    # encodings.cp437 not found in PYZ
    import 'encodings.cp437' # <zipimporter object "/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/base_library.zip/encodings/">
    import 'shibokensupport' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import 'shibokensupport.signature' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import 'shibokensupport.feature' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import 'shibokensupport.signature.mapping' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import 'shibokensupport.signature.errorhandler' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import 'shibokensupport.signature.layout' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import 'shibokensupport.signature.lib' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import 'shibokensupport.signature.lib.tool' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import 'shibokensupport.signature.parser' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    # PySide6.support not found in PYZ
    import 'shibokensupport.signature.importhandler' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import 'shibokensupport.signature.lib.enum_sig' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    import argparse # PyInstaller PYZ
    import gettext # PyInstaller PYZ
    import 'gettext' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'argparse' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import logging # PyInstaller PYZ
    import string # PyInstaller PYZ
    import '_string' # <class '_frozen_importlib.BuiltinImporter'>
    import 'string' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>
    import 'logging' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    # shiboken6.Shiboken not found in PYZ
    # extension module 'shiboken6.Shiboken' loaded from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/shiboken6/Shiboken.abi3.so'
    # extension module 'shiboken6.Shiboken' executed from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/shiboken6/Shiboken.abi3.so'
    import 'shiboken6.Shiboken' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7fb4a9179a20>
    import 'shibokensupport.signature.lib.pyi_generator' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    # PySide6.support not found in PYZ
    import 'shibokensupport.signature.loader' # <signature_bootstrap.EmbeddableZipImporter object at 0x7fb4a9162230>
    # extension module 'shiboken6.Shiboken' loaded from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/shiboken6/Shiboken.abi3.so'
    # extension module 'shiboken6.Shiboken' executed from '/home/automator/sandbox/pyinstaller-pyside6-testcase/dist/test/shiboken6/Shiboken.abi3.so'
    import 'shiboken6.Shiboken' # <_frozen_importlib_external.ExtensionFileLoader object at 0x7fb4a90feaa0>
    import 'shiboken6' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    import 'PySide6' # <pyimod02_importers.FrozenImporter object at 0x7fb4a93dc640>
    # PySide6.QtQml not found in PYZ
    Traceback (most recent call last):
      File "test.py", line 1, in <module>
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 571, in module_from_spec
      File "<frozen importlib._bootstrap_external>", line 1176, in create_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    ImportError: libpyside6qml.abi3.so.6.4: cannot open shared object file: No such file or directory
    [104115] Failed to execute script 'test' due to unhandled exception!
    # (snip)
    
    not-our-bug 
    opened by mofahead 14
  • Improvements to generated app bundles on macOS

    Improvements to generated app bundles on macOS

    Description of the issue

    This issue is a collection of problems with the app bundles that pyinstall builds for macOS. It is meant to point out things that could easily be fixed and would result in cleaner, actually usable app bundles:

    1. removing all RPATH entries is not what you want to do
    • it seems like the right thing to do but you really only want to remove absolute RPATHs (not pointing to system libraries) and convert them to @rpath relatives
    • this goes for all dependencies off all binary python modules as well as the interpreter and wrapper itself
    1. @executable_path/../Frameworks and optionally @executable_path should be added via install_name_tool -add_rpath
    • this plays together with the point 1) as it allows the dynamic linker to look in the executable's directory as well as in the relative Frameworks directory and actually find dylibs there. What currently happens if you have a binary module that tries to load a dependency dynamically at runtime is that the frozen app will crash as there are no known paths to look for that dependency and dyld does not look in the current directory by default.
    1. Contents/MacOS should contain only binaries and symlinks
    • this mainly concerns apps that want to be notarised (most macOS apps these days) or be listed in the Mac AppStore
    • it's consistent with the bundle layout for most native apps
    1. (after 3 is implemented) the PyInstall bootstrapper needs to set PYTHONPATH to include @executable_dir/../Frameworks
    • this step would remove the requirement to symlink directories and .so files from ../Frameworks back to the bin directory

    Here's a comparison of the layout of a simply PyInstaller Qt6 bundle and a bundle modified to include the suggested changes:

    • plain PyInstaller output:

    qt6demo2.app/Contents qt6demo2.app/Contents/Frameworks qt6demo2.app/Contents/Info.plist qt6demo2.app/Contents/MacOS qt6demo2.app/Contents/MacOS/PySide6 ... [all of PySide6's contents] qt6demo2.app/Contents/MacOS/Python qt6demo2.app/Contents/MacOS/QtCore qt6demo2.app/Contents/MacOS/QtDBus qt6demo2.app/Contents/MacOS/QtGui qt6demo2.app/Contents/MacOS/QtNetwork qt6demo2.app/Contents/MacOS/QtOpenGL qt6demo2.app/Contents/MacOS/QtQml qt6demo2.app/Contents/MacOS/QtQmlModels qt6demo2.app/Contents/MacOS/QtQuick qt6demo2.app/Contents/MacOS/QtSvg qt6demo2.app/Contents/MacOS/QtVirtualKeyboard qt6demo2.app/Contents/MacOS/QtWidgets qt6demo2.app/Contents/MacOS/base_library.zip -> ../Resources/base_library.zip qt6demo2.app/Contents/MacOS/lib-dynload qt6demo2.app/Contents/MacOS/lib-dynload/_bisect.cpython-310-darwin.so ... [all of Python's native module so files] qt6demo2.app/Contents/MacOS/lib-dynload/zlib.cpython-310-darwin.so qt6demo2.app/Contents/MacOS/libcrypto.1.1.dylib qt6demo2.app/Contents/MacOS/liblzma.5.dylib qt6demo2.app/Contents/MacOS/libmpdec.2.5.1.dylib qt6demo2.app/Contents/MacOS/libpyside6.abi3.6.3.dylib qt6demo2.app/Contents/MacOS/libshiboken6.abi3.6.3.dylib qt6demo2.app/Contents/MacOS/libssl.1.1.dylib qt6demo2.app/Contents/MacOS/qt6demo2 qt6demo2.app/Contents/MacOS/shiboken6 qt6demo2.app/Contents/MacOS/shiboken6/Shiboken.abi3.so qt6demo2.app/Contents/Resources qt6demo2.app/Contents/Resources/base_library.zip qt6demo2.app/Contents/Resources/icon-windowed.icns qt6demo2.app/Contents/_CodeSignature qt6demo2.app/Contents/_CodeSignature/CodeResources

    $ otool -l qt6demo2.app/Contents/MacOS/qt6demo2 | grep -b3 RPATH
    <empty>
    $ otool -l qt6demo2.app/Contents/MacOS/Python | grep -b3 RPATH
    12194-      current version 1311.100.3
    12227-compatibility version 1.0.0
    12255-Load command 14
    12271:          cmd LC_RPATH
    12294-      cmdsize 32
    12311-         path /opt/homebrew/lib (offset 12)
    12355-Load command 15
    
    • same bundle but with fixed locations for shared libraries and runtime data + fixed rpaths:

    qt6demo2.app qt6demo2.app/Contents qt6demo2.app/Contents/Frameworks qt6demo2.app/Contents/Frameworks/PySide6 ... [all of PySide6's contents] qt6demo2.app/Contents/Frameworks/lib-dynload qt6demo2.app/Contents/Frameworks/lib-dynload/_bisect.cpython-310-darwin.so ... [all of Python's native module so files] qt6demo2.app/Contents/Frameworks/lib-dynload/_blake2.cpython-310-darwin.so qt6demo2.app/Contents/Frameworks/libcrypto.1.1.dylib qt6demo2.app/Contents/Frameworks/liblzma.5.dylib qt6demo2.app/Contents/Frameworks/libmpdec.2.5.1.dylib qt6demo2.app/Contents/Frameworks/libpyside6.abi3.6.3.dylib qt6demo2.app/Contents/Frameworks/libshiboken6.abi3.6.3.dylib qt6demo2.app/Contents/Frameworks/libssl.1.1.dylib qt6demo2.app/Contents/Frameworks/shiboken6 qt6demo2.app/Contents/Frameworks/shiboken6/Shiboken.abi3.so qt6demo2.app/Contents/Info.plist qt6demo2.app/Contents/MacOS qt6demo2.app/Contents/MacOS/qt6demo2 qt6demo2.app/Contents/MacOS/PySide6 -> ../Frameworks/PySide6 qt6demo2.app/Contents/MacOS/Python qt6demo2.app/Contents/MacOS/base_library.zip -> ../Resources/base_library.zip qt6demo2.app/Contents/MacOS/lib-dynload -> ../Frameworks/lib-dynload qt6demo2.app/Contents/MacOS/shiboken6 -> ../Frameworks/shiboken6 qt6demo2.app/Contents/Resources qt6demo2.app/Contents/Resources/base_library.zip qt6demo2.app/Contents/Resources/icon-windowed.icns qt6demo2.app/Contents/_CodeSignature qt6demo2.app/Contents/_CodeSignature/CodeDirectory qt6demo2.app/Contents/_CodeSignature/CodeRequirements qt6demo2.app/Contents/_CodeSignature/CodeRequirements-1 qt6demo2.app/Contents/_CodeSignature/CodeResources qt6demo2.app/Contents/_CodeSignature/CodeSignature

    $ otool -l qt6demo2.app/Contents/MacOS/qt6demo2 | grep -b3 RPATH
    6641-  dataoff 970848
    6658- datasize 25888
    6674-Load command 22
    6690:          cmd LC_RPATH
    6713-      cmdsize 32
    6730-         path @executable_path (offset 12)
    6773-Load command 23
    6789:          cmd LC_RPATH
    6812-      cmdsize 48
    6829-         path @executable_path/../Frameworks/ (offset 12)
    
    $ otool -l qt6demo2.app/Contents/MacOS/qt6demo2 | grep -b3 RPATH
    12407-      current version 1311.100.3
    12440-compatibility version 1.0.0
    12468-Load command 14
    12484:          cmd LC_RPATH
    12507-      cmdsize 32
    12524-         path /opt/homebrew/lib (offset 12)
    12568-Load command 15
    --
    12801-  dataoff 3609200
    12819- datasize 46480
    12835-Load command 18
    12851:          cmd LC_RPATH
    12874-      cmdsize 32
    12891-         path @executable_path (offset 12)
    12934-Load command 19
    12950:          cmd LC_RPATH
    12973-      cmdsize 48
    12990-         path @executable_path/../Frameworks/ (offset 12)
    

    And a simple bash script that shows the applied changes (which could be done by PyInstaller in the first place), not including PYTHONPATH:

     #!/bin/zsh
    
    if [ ! -d "$1" ] then
        echo "usage: fix-py-bundle.sh <app-bundle>" >&2
       exit 1
    fi
    
    WRAPPER_NAME="$(basename $1 .app)"
    
    pushd "$1" > /dev/null
    
       # move any shared objects and other dependencies to Frameworks
        find Contents/MacOS/ -iname '*.dylib' -mindepth 0 -maxdepth 1 -exec mv '{}' Contents/Frameworks/ ';'
        find Contents/MacOS/ -iname '*.so'    -mindepth 0 -maxdepth 1 -exec mv '{}' Contents/Frameworks/ ';'
        find Contents/MacOS/ -name 'Qt*'     -mindepth 0 -maxdepth 1 -exec mv '{}' Contents/Frameworks/ ';'
        find Contents/MacOS/ -type d          -mindepth 1 -maxdepth 1 -exec mv '{}' Contents/Frameworks/ ';'
     
       # add the missing rpath entries to actually look in Frameworks for shared objects
        install_name_tool -add_rpath '@executable_path' "Contents/MacOS/$WRAPPER_NAME"
        install_name_tool -add_rpath '@executable_path' Contents/MacOS/Python
        install_name_tool -add_rpath '@executable_path/../Frameworks/' "Contents/MacOS/$WRAPPER_NAME"
        install_name_tool -add_rpath '@executable_path/../Frameworks/' Contents/MacOS/Python
    
       # create symlinks for all directories that got moved to Frameworks since we don't have influence on
       # PYTHONPATH (would not be needed if it contained @executable_path/../Frameworks as well)
        pushd Contents/MacOS/ > /dev/null
        find ../Frameworks/ -type d -mindepth 1 -maxdepth 1 -exec ln -s '{}' . ';'
        popd  > /dev/null
    
        # refresh the ad-hoc signature (could our actual signing profile here..)
        codesign -s - -f --deep .
    popd > /dev/null
    

    I would have gladly tried to provide a PR with all of this but attempting to build PyInstaller on macOS is a hot mess ^^'.

    Context information (for bug reports)

    • Output of pyinstaller --version: 5.6.1
    • Version of Python: 3.10.6
    • Platform: OS X
    • How you installed Python: brew
    • Did you also try this on another platform? Does it work there? - not relevant
    help wanted bug 
    opened by Shirk 0
Releases(v5.7.0)
  • v5.7.0(Dec 4, 2022)

  • v5.6.2(Oct 31, 2022)

  • v5.6.1(Oct 25, 2022)

  • v5.6(Oct 24, 2022)

  • v5.5(Oct 8, 2022)

  • v5.4.1(Sep 11, 2022)

  • v5.4(Sep 10, 2022)

  • v5.3(Jul 30, 2022)

  • v5.2(Jul 8, 2022)

  • v5.1(May 17, 2022)

  • v5.0(Apr 17, 2022)

  • v4.10(Mar 5, 2022)

  • v4.9(Feb 4, 2022)

  • v4.8(Jan 12, 2022)

  • v4.7(Nov 10, 2021)

  • v4.6(Oct 29, 2021)

  • v4.5.1(Aug 7, 2021)

  • v4.5(Aug 1, 2021)

  • v4.4(Jul 13, 2021)

  • v4.0(Aug 9, 2020)

    Release 4.0 adds support for 3rd-party packages to provide PyInstaller hooks along with the package. This allows Maintainers of other Python packages to deliver up-to-date PyInstaller hooks as part of their package. See our sample project for more information.

    PyInstaller uses this option itself to provide updated hooks much faster: Many hooks are moved into the new package pyinstaller-hooks-contrib which is updated monthly. This package is installed automatically when installing PyInstaller, but can also be updated independently.

    Finally, this version drops support for Python 2.7, which is end-of-life since January 2020.. The minimum required version is now Python 3.5. The last version supporting Python 2.7 was PyInstaller 3.6.

    You can find a detailed list of changes in this release in the change log section of the manual.

    Source code(tar.gz)
    Source code(zip)
    pyinstaller-4.0.tar.gz(3.31 MB)
    pyinstaller-4.0.tar.gz.asc(833 bytes)
  • v3.6(Jan 9, 2020)

  • v3.5(Jul 9, 2019)

  • v3.4(Sep 9, 2018)

  • v3.3.1(Dec 15, 2017)

    Hooks

    • Fix imports in hooks accessible_output and sound_lib (#2860).
    • Fix ImportError for sysconfig for 3.5.4 Conda (#3105, #3106).
    • Fix shapely hook for conda environments on Windows (#2838).
    • Add hook for unidecode.

    Bootloader

    • (Windows) Pre-build bootloaders (and custom-build ones using MSVC) can be used on Windows XP again. Set minimum target OS to XP (#2974).

    Bootloader build

    • Fix build for FreeBSD (#2861, #2862).

    PyInstaller Core

    • Usage: Add help-message clarifying use of options when a spec-file is provided (#3039).

    • Add printing infos on UnicodeDecodeError in exec_command(_all).

    • (win32) Issue an error message on errors loading the icon file (#2039).

    • (aarch64) Use correct bootloader for 64-bit ARM (#2873).

    • (OS X) Fix replacement of run-time search path keywords (@… ) (#3100).

    • Modulegraph

      • Fix recursion too deep errors cause by reimporting SWIG-like modules (#2911, #3040, #3061).
      • Keep order of imported identifiers.

    Test-suite and Continuous Integration

    • In Continuous Integration tests: Enable flake8-diff linting. This will refuse all changed lines not following PEP 8.

    • Enable parallel testing on Windows,

    • Update requirements.

    • Add more test cases for modulegraph.

    • Fix a test-case for order of module import.

    • Add test-cases to check scripts do not share the same global vars (see below).

    Documentation

    • Add clarification about treatment of options when a spec-file is provided (#3039).

    • Add docs for running PyInstaller with Python optimizations (#2905).

    • Add notes about limitations of Cython support.

    • Add information how to handle undetected ctypes libraries.

    • Add notes about requirements and restrictions of SWIG support.

    • Add note to clarify what binary files are.

    • Add a Development Guide.

    • Extend "How to Contribute".

    • Add "Running the Test Suite".

    • Remove badges from the Readme (#2853).

    • Update outdated sections in man-pages and other enhancements to the man-page.

    Known Issues

    • All scripts frozen into the package, as well as all run-time hooks, share the same global variables. This issue exists since v3.2 but was discovered only lately, see #3037. This may lead to leaking global variables from run-time hooks into the script and from one script to subsequent ones. It should have effects in rare cases only, though.

    • Further see the Known Issues for release 3.3.

    Source code(tar.gz)
    Source code(zip)
    PyInstaller-3.3.1.tar.gz(3.29 MB)
    PyInstaller-3.3.1.tar.gz.asc(801 bytes)
  • v3.3(Sep 21, 2017)

    • Add Support for Python 3.6! Many thanks to xiovat! (#2331, #2341)

    • New command line options for adding data files (--datas, #1990) and binaries (--binaries, #703)

    • Add command line option '--runtime-tmpdir'.

    • Bootloaders for Windows are now build using MSVC and statically linked with the run-time-library (CRT). This solved a lot of issues related to .dlls being incompatible with the ones required by python.dll.

    • Bootloaders for GNU/Linux are now officially no LSB binaries. This was already the case since release 3.1, but documented the other way round. Also the build defaults to non-LSB binaries now. (#2369)

    • We improved and stabilized both building the bootloaders and the continuous integration tests. See below for details. Many thanks to all who worked on this.

    • To ease solving issues with packages included wrongly, the html-file with a cross-reference is now always generated. It's visual appearance has been modernized (#2765).

    Incompatible changes

    • Command-line option obsoleted several version ago are not longer handled gracefully but raise an error (#2413)

    • Installation: PyInstaller removed some internal copies of 3rd-party packages. These are now taken from their official releases at PyPI (#2589). This results in PyInstaller to no longer can be used from just an unpacked archive, but needs to be installed like any Python package. This should effect only a few people, e.g. the developers.

    • Following :pep:527, we only release one source archive now and decided to use .tar.gz (#2754).

    Hooks

    • New and Updated hooks: accessible_output2 (#2266), ADIOS (#2096), CherryPy (#2112), PySide2 (#2471, #2744) (#2472), Sphinx (#2612, 2708) (#2708), appdir (#2478), clr (#2048), cryptodome (#2125), cryptography (#2013), dclab (#2657), django (#2037), django migrations (#1795), django.contrib (#2336), google.cloud, google.cloud.storage, gstreamer (#2603), imageio (#2696), langcodes (#2682), libaudioverse (#2709), mpl_toolkits (#2400), numba, llvmlite (#2113), openpyxl (#2066), pylint, pymssql, pyopencl, pyproj (#2677), pytest (#2119), qtawesome (#2617), redmine, requests (#2334), setuptools, setuptools (#2565), shapely (#2569), sound_lib (#2267), sysconfig, uniseg (#2683), urllib3, wx.rc (#2295),

      • numpy: Look for .dylib libraries, too ( (#2544), support numpy MKL builds (#1881, #2111)

      • osgeo: Add conda specific places to check for auxiliary data (#2401)

      • QT and related

        • Add hooks for PySide2
        • Eliminate run-time hook by placing files in the correct directory
        • Fix path in homebrew for searching for qmake (#2354)
        • Repair Qt dll location (#2403)
        • Bundle PyQT 5.7 DLLs (#2152)
        • PyQt5: Return qml plugin path including subdirectory (#2694)
        • Fix hooks for PyQt5.QtQuick (#2743)
        • PyQt5.QtWebEngineWidgets: Include files needed by QWebEngine
      • GKT+ and related

        • Fix Gir file path on windows.
        • Fix unnecessary file search & generation when GI's typelib is exists
        • gi: change gir search path when running from a virtualenv
        • gi: package gdk-pixbuf in osx codesign agnostic dir
        • gi: rewrite the GdkPixbuf loader cache at runtime on Linux
        • gi: support onefile mode for GdkPixbuf
        • gi: support using gdk-pixbuf-query-loaders-64 when present
        • gi: GIR files are only required on OSX
        • gio: copy the mime.cache also
        • Fix hooks for PyGObject on windows platform (#2306)
    • Fixed hooks: botocore (#2384), clr (#1801), gstreamer (#2417), h5py (#2686), pylint, Tix data files (#1660), usb.core (#2088), win32com on non-windows-systems (#2479)

    • Fix multiprocess spawn mode on POSIX OSs (#2322, #2505, #2759, #2795).

    Bootloader

    • Add tempdir option to control where bootloader will extract files (#2221)

    • (Windows) in releases posted on PyPI requires msvcr*.dll (#2343)

    • Fix unsafe string manipulation, resource and memory leaks. Thanks to Vito Kortbeek (#2489, #2502, #2503)

    • Remove a left-over use of getenv()

    • Set proper LISTEN_PID (set by systemd) in child process (#2345)

    • Adds PID to bootloader log messages (#2466, #2480)

    • (Windows) Use _wputenv_s() instead of SetEnvironmentVariableW()

    • (Windows) Enhance error messages (#1431)

    • (Windows) Add workaround for a Python 3 issue http://bugs.python.org/issue29778 (#2496, #2844)

    • (OS X): Use single process for --onedir mode (#2616, #2618)

    • (GNU/Linux) Compile bootloaders with --no-lsb by default (#2369)

    • (GNU/Linux) Fix: linux64 bootloader requires glibc 2.14 (#2160)

    • (GNU/Linux) set_dynamic_library_path change breaks plugin library use (#625)

    Bootloader build

    The bootloader build was largely overhauled. In the wscript, the build no longer depends on the Python interpreter's bit-size, but on the compiler. We have a machine for building bootloaders for Windows and cross-building for OS X. Thus all mainteriner are now able to build the bootloaders for all supported platforms.

    • Add "official" build-script.

    • (GNU/Linux) Make --no-lsb the default, add option --lsb.

    • Largely overhauled Vagrantfile:

      • Make Darwin bootloaders build in OS X box (unused)
      • Make Windows bootloaders build using MSVC
      • Allow specifying cross-target on linux64.
      • Enable cross-building for OS X.
      • Enable cross-building for Windows (unused)
      • Add box for building osxcross.
    • Largely overhauled wscript:

      • Remove options --target-cpu.
      • Use compiler's target arch, not Python's.
      • Major overhaul of the script
      • Build zlib if required, not if "on windows".
      • Remove obsolete warnings.
      • Update Solaris, AIX and HPUX support.
      • Add flags for 'strip' tool in AIX platform.
      • Don't set POSIX / SUS version defines.
    • (GNU/Linux) for 64-bit arm/aarch ignore the :program:gcc flag -m64 (#2801).

    Module loader

    • Implement PEP-451 ModuleSpec type import system (#2377)
    • Fix: Import not thread-save? (#2010, #2371)

    PyInstaller Core

    • Analyze: Check Python version when testing whether to rebuild.

    • Analyze: Don't fail on syntax error in modules, simply ignore them.

    • Better error message when datas are not found. (#2308)

    • Building: OSX: Use unicode literals when creating Info.plist XML

    • Building: Don't fail if "datas" filename contain glob special characters. (#2314)

    • Building: Read runtime-tmpdir from .spec-file.

    • Building: Update a comment.

    • building: warn users if bincache gets corrupted. (#2614)

    • Cli-utils: Remove graceful handling of obsolete command line options.

    • Configure: Create new parent-dir when moving old cache-dir. (#2679)

    • Depend: Include vcruntime140.dll on Windows. (#2487)

    • Depend: print nice error message if analyzed script has syntax error.

    • Depend: When scanning for ctypes libs remove non-basename binaries.

    • Enhance run-time error message on ctypes import error.

    • Fix #2585: py2 non-unicode sys.path been tempted by os.path.abspath(). (#2585)

    • Fix crash if extension module has hidden import to ctypes. (#2492)

    • Fix handling of obsolete command line options. (#2411)

    • Fix versioninfo.py breakage on Python 3.x (#2623)

    • Fix: "Unicode-objects must be encoded before hashing" (#2124)

    • Fix: UnicodeDecodeError - collect_data_files does not return filenames as unicode (#1604)

    • Remove graceful handling of obsolete command line options. (#2413)

    • Make grab version more polite on non-windows (#2054)

    • Make utils/win32/versioninfo.py round trip the version info correctly.

    • Makespec: Fix version number processing for PyCrypto. (#2476)

    • Optimizations and refactoring to modulegraph and scanning for ctypes dependencies.

    • pyinstaller should not crash when hitting an encoding error in source code (#2212)

    • Remove destination for COLLECT and EXE prior to copying it (#2701)

    • Remove uninformative traceback when adding not found data files (#2346)

    • threading bug while processing imports (#2010)

    • utils/hooks: Add logging to collect_data_files.

    • (win32) Support using pypiwin32 or pywin32-ctypes (#2602)

    • (win32) Use os.path.normpath to ensure that system libs are excluded.

    • (win32) Look for libpython%.%.dll in Windows MSYS2 (#2571)

    • (win32) Make versioninfo.py round trip the version info correctly (#2599)

    • (win32) Ensure that pywin32 isn't imported before check_requirements is called

    • (win32) pyi-grab_version and --version-file not working? (#1347)

    • (win32) Close PE() object to avoid mmap memory leak (#2026)

    • (win32) Fix: ProductVersion in windows version info doesn't show in some cases (#846)

    • (win32) Fix multi-byte path bootloader import issue with python2 (#2585)

    • (win32) Forward DYLD_LIBRARY_PATH through arch command. (#2035)

    • (win32) Add vcruntime140.dll to_win_includes for Python 3.5 an 3.6 (#2487)

    • (OS X) Add libpython%d.%dm.dylib to Darwin (is_darwin) PYDYLIB_NAMES. (#1971)

    • (OS X) macOS bundle Info.plist should be in UTF-8 (#2615)

    • (OS X) multiprocessing spawn in python 3 does not work on macOS (#2322)

    • (OS X) Pyinstaller not able to find path (@rpath) of dynamic library (#1514)

    • Modulegraph

      • Align with upstream version 0.13.
      • Add the upstream test-suite
      • Warn on syntax error and unicode error. (#2430)
      • Implement enumerate_instructions() (#2720)
      • Switch byte-code analysis to use Instruction (like dis3 does) (#2423)
      • Log warning on unicode error instead of only a debug message (#2418)
      • Use standard logging for messages. (#2433)
      • Fix to reimport failed SWIG C modules (1522, #2578).
    • Included 3rd-party libraries

      • Remove bundled pefile and macholib, use the releases from PyPI. (#1920, #2689)
      • altgraph: Update to altgraph 0.13, add upstream test-suite.

    Utilities

    • :program:grab_version.py: Display a friendly error message when utility fails (#859, #2792).

    Test-suite and Continuous Integration

    • Rearrange requirements files.

    • Pin required versions – now updated using pyup (#2745)

    • Hide useless trace-backs of helper-functions.

    • Add a test for PyQt5.QtQuick.

    • Add functional tests for PySide2

    • Add test for new feature --runtime-tmpdir.

    • Fix regression-test for #2492.

    • unit: Add test-cases for PyiModuleGraph.

    • unit/altgraph: Bringing in upstream altgraph test-suite.

    • unit/modulegraph: Bringing in the modulegraph test-suite.

    • Continuous Integration

      • Lots of enhancements to the CI tests to make them more stabile and reliable.
      • Pin required versions – now updated using pyup (#2745)
      • OS X is now tested along with GNU/Linux at Travis CI (#2508)
      • Travis: Use stages (#2753)
      • appveyor: Save cache on failure (#2690)
      • appveyor: Verify built bootloaders have the expected arch.

    Documentation

    • Add information how to donate (#2755, #2772).
    • Add how to install the development version using pip.
    • Fix installation instructions for development version. (#2761)
    • Better examples for hidden imports.
    • Clarify and fix "Adding Data Files" and "Adding Binary Files". (#2482)
    • Document new command line option '--runtime-tmpdir'.
    • pyinstaller works on powerpc linux, big endian arch (#2000)
    • Largely rewrite section "Building the Bootloader", update from the wiki page.
    • Describe building LSB-compliant bootloader as (now) special case.
    • help2rst: Add cross-reference labels for option-headers.
    • Enable sphinx.ext.intersphinx and links to our website.
    • Sphinx should not "adjust" display of command line documentation (#2217)

    Known Issues

    • Data-files from wheels, unzipped eggs or not ad egg at all are not included automatically. This can be worked around using a hook-file, but may not suffice when using --onefile and something like python-daemon.

    • The multipackage (MERGE) feature (#1527) is currently broken.

    • (OSX) Support for OpenDocument events (#1309) is broken.

    • (Windows) With Python 2.7 the frozen application may not run if the user-name (more specifically %TEMPDIR%) includes some Unicode characters. This does not happen with all Unicode characters, but only some and seems to be a windows bug. As a work-around please upgrade to Python 3 (#2754, #2767).

    • (Windows) For Python >= 3.5 targeting Windows < 10, the developer needs to take special care to include the Visual C++ run-time .dlls. Please see the section :ref:Platform-specific Notes <Platform-specific Notes - Windows> in the manual. (#1566)

    • For Python 3.3, imports are not thread-safe (#2371#). Since Python 3.3 is end of live at 2017-09-29, we are not going to fix this.

    Source code(tar.gz)
    Source code(zip)
    PyInstaller-3.3.tar.gz(3.29 MB)
    PyInstaller-3.3.tar.gz.asc(801 bytes)
  • v3.2.1(Jan 15, 2017)

    • New, updated and fixed hooks: botocore (#2094), gi (#2347), jira (#2222), PyQt5.QtWebEngineWidgets (#2269), skimage (#2195, 2225), sphinx (#2323,) xsge_gui (#2251).

    Fixed the following issues:

    • Don't fail if working directory already exists (#1994)
    • Avoid encoding errors in main script (#1976)
    • Fix hasher digest bytes not str (#2229, #2230)
    • (Windows) Fix additional dependency on the msvcrt10.dll (#1974)
    • (Windows) Correctly decode a bytes object produced by pefile (#1981)
    • (Windows) Package pefile with pyinstaller. This partially undoes some changes in 3.2 in which the packaged pefiles were removed to use the pypi version instead. The pypi version was considerably slower in some applications, and still has a couple of small issues on PY3. (#1920)
    • (OS X) PyQt5 packaging issues on MacOS (#1874)
    • (OS X) Replace run-time search path keyword (#1965)
    • (OS X) (Re-) add argv emulation for OSX, 64-bit (#2219)
    • (OS X) use decode("utf-8") to convert bytes in getImports_macholib() (#1973)
    • (Bootloader) fix segfaults (#2176)
    • (setup.py) pass option --no-lsb on GNU/Linux only (#1975)
    • Updates and fixes in documentation, manuals, et al. (#1986, 2002, #2153, #2227, #2231)
    Source code(tar.gz)
    Source code(zip)
    PyInstaller-3.2.1.tar.bz2(2.32 MB)
    PyInstaller-3.2.1.tar.bz2.asc(801 bytes)
    PyInstaller-3.2.1.tar.gz(2.72 MB)
    PyInstaller-3.2.1.tar.gz.asc(801 bytes)
    PyInstaller-3.2.1.zip(3.01 MB)
    PyInstaller-3.2.1.zip.asc(801 bytes)
  • v3.2(May 3, 2016)

    • Even the "main" script is now byte-compiled (#1847, #1856)
    • The manual is on readthedocs.io now (#1578)
    • On installation try to compile the bootloader if there is none for the current plattform (#1377)
    • (Unix) Use objcopy to create a valid ELF file (#1812, #1831)
    • (Linux): Compile with _FORTIFY_SOURCE (#1820)
    • New, updated and fixed hooks: CherryPy (#1860), Cryptography (#1425, #1861), enchant (1562), gi.repository.GdkPixbuf (#1843), gst (#1963), Lib2to3 (#1768), PyQt4, PyQt5, PySide (#1783, #1897, #1887), SciPy (#1908, #1909), sphinx (#1911, #1912), sqlalchemy (#1951), traitlets wx.lib.pubsub (#1837, #1838),
    • For windowed mode add isatty() for our dummy NullWriter (#1883)
    • Suppress "Failed to execute script" in case of SystemExit (#1869)
    • Do not apply Upx compressor for bootloader files (#1863)
    • Fix absolute path for lib used via ctypes (#1934)
    • (OSX) Fix binary cache on NFS (#1573, #1849)
    • (Windows) Fix message in grab_version (#1923)
    • (Windows) Fix wrong icon paramter in Windows example (#1764)
    • (Windows) Fix win32 unicode handling (#1878)
    • (Windows) Fix unnecessary rebuilds caused by rebuilding winmanifest (#1933)
    • (Cygwin) Fix finding the Python library for Cygwin 64-bit (#1307, #1810, #1811)
    • (OSX) Fix compilation issue (#1882)
    • (Windows) No longer bundle pefile, use package from for windows (#1357)
    • (Windows) Provide a more robust means of executing a Python script
    • AIX fixes.
    • Update waf to version 1.8.20 (#1868)
    • Fix excludedimports, more predictable order how hooks are applied #1651
    • Internal impovements and code clean-up (#1754, #1760, #1794, #1858, #1862, #1887, #1907, #1913)
    • Clean-ups fixes and improvements for the test suite

    Known Issues

    • Apps built with Windows 10 and Python 3.5 may not run on Windows versions earlier than 10 (#1566).
    • The multipackage (MERGE) feature (#1527) is currently broken.
    • (OSX) Support for OpenDocument events (#1309) is broken.
    Source code(tar.gz)
    Source code(zip)
    PyInstaller-3.2.tar.gz(2.64 MB)
    PyInstaller-3.2.tar.gz.asc(801 bytes)
    PyInstaller-3.2.zip(2.93 MB)
    PyInstaller-3.2.zip.asc(801 bytes)
Owner
PyInstaller
Converts (packages) Python programs into stand-alone executables, under Windows, Linux, Mac OS X, AIX and Solaris.
PyInstaller
Ninja is a small build system with a focus on speed.

Ninja Python Distributions Ninja is a small build system with a focus on speed. The latest Ninja python wheels provide ninja 1.10.2.g51db2.kitware.job

33 Dec 19, 2022
Subpar is a utility for creating self-contained python executables. It is designed to work well with Bazel.

Subpar Subpar is a utility for creating self-contained python executables. It is designed to work well with Bazel. Status Subpar is currently owned by

Google 550 Dec 27, 2022
The Application can convert the .py file into exe for faster transformation and can result to build an app in a single click

PEXEY PEXEY Is a high robust py to exe app made top on pyinstaller this application is for the developer who constantly keep making py to exe apps IMP

Aaris Kazi 11 Dec 15, 2022
executable archive format

XAR XAR lets you package many files into a single self-contained executable file. This makes it easy to distribute and install. A .xar file is a read-

Facebook Incubator 1.5k Dec 29, 2022
A modern Python application packaging and distribution tool

PyOxidizer PyOxidizer is a utility for producing binaries that embed Python. The over-arching goal of PyOxidizer is to make complex packaging and dist

Gregory Szorc 4.5k Jan 07, 2023
Create standalone executables from Python scripts, with the same performance and is cross-platform.

About cx_Freeze cx_Freeze creates standalone executables from Python scripts, with the same performance, is cross-platform and should work on any plat

Marcelo Duarte 1k Jan 04, 2023
Python virtualenvs in Debian packages

dh-virtualenv Contents Overview Presentations, Blogs & Other Resources Using dh-virtualenv How does it work? Running tests Building the package in a D

Spotify 1.5k Dec 16, 2022
Psgcompiler A PySimpleGUI Application - Transform your Python programs in Windows, Mac, and Linux binary executables

psgcompiler A PySimpleGUI Application "Compile" your Python programs into an EXE for Windows, an APP for Mac, and a binary for Linux Installation Old-

PySimpleGUI 77 Jan 07, 2023
auto packaging for iOS

iOS Auto Packaging iOS自动打包脚本 准备 脚本第一次执行之前 先检查依赖, packaging目录下终端执行 pip3 install -r requirements.txt 运行 cd packaging packaging.py -h help -s scheme

DeeCo 17 Jul 23, 2022
Python-easy-pack For Linux/Unix, Changed by laman28

Python-easy-pack For Linux/Unix, Changed by laman28

LMFS 2 Jan 28, 2022
An example of repository data as bundles

Bundles This repository is just an example of how we can host Git bundles in a way that supports fetching data from precomputed bundles without the or

Derrick Stolee 1 Jan 02, 2022
A tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

PyArmor Homepage (中文版网站) Documentation(中文版) PyArmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine

Dashingsoft 1.9k Jan 01, 2023
local pypi server (custom packages and auto-mirroring of pypi)

localshop A PyPI server which automatically proxies and mirrors PyPI packages based upon packages requested. It has support for multiple indexes and t

Michael van Tellingen 383 Sep 23, 2022
FreezeUI is a python package that creates applications using cx_freeze and GUI by converting .py to .exe .

FreezeUI is a python package use to create cx_Freeze setup files and run them to create applications and msi from python scripts (converts .py to .exe or .msi .

4 Aug 25, 2022
Freeze (package) Python programs into stand-alone executables

PyInstaller Overview PyInstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app withou

PyInstaller 9.9k Jan 08, 2023
Python Wheel Obfuscator

pywhlobf obfuscates your wheel distribution by compiling python source file to shared library.

Hunt Zhan 79 Dec 22, 2022
py2app is a Python setuptools command which will allow you to make standalone Mac OS X application bundles and plugins from Python scripts.

py2app is a Python setuptools command which will allow you to make standalone Mac OS X application bundles and plugins from Python scripts. py2app is

Ronald Oussoren 222 Dec 30, 2022
shiv is a command line utility for building fully self contained Python zipapps as outlined in PEP 441, but with all their dependencies included.

shiv shiv is a command line utility for building fully self-contained Python zipapps as outlined in PEP 441, but with all their dependencies included!

LinkedIn 1.5k Dec 28, 2022
Core utilities for Python packages

packaging Reusable core utilities for various Python Packaging interoperability specifications. This library provides utilities that implement the int

Python Packaging Authority 451 Jan 04, 2023
A library and tool for generating .pex (Python EXecutable) files

PEX Contents Overview Installation Simple Examples Integrating pex into your workflow Documentation Development Contributing Overview pex is a library

Pants Build 2.2k Jan 01, 2023