π You can find a detailed list of changes in this release in the change log section of the manual.
π 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.
π See https://pyinstaller.readthedocs.io/en/v3.6/CHANGES.html for Changelog.
π See https://pyinstaller.readthedocs.io/en/v3.5/CHANGES.html for Changelog.
π See https://pyinstaller.readthedocs.io/en/v3.4/CHANGES.html for Changelog.
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
π 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).
β 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.
π¦ 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.
β 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).
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).
π 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](https://github.com/pyinstaller/pyinstaller/pull/2354))
- Repair Qt dll location ([#2403](https://github.com/pyinstaller/pyinstaller/pull/2403))
- Bundle PyQT 5.7 DLLs ([#2152](https://github.com/pyinstaller/pyinstaller/issues/2152))
- PyQt5: Return qml plugin path including subdirectory ([#2694](https://github.com/pyinstaller/pyinstaller/issues/2694))
- Fix hooks for PyQt5.QtQuick ([#2743](https://github.com/pyinstaller/pyinstaller/pull/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](https://github.com/pyinstaller/pyinstaller/pull/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).
β 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)
π 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:
Largely overhauled wscript:
π§ (GNU/Linux) for 64-bit arm/aarch ignore the :program:gcc flag -m64
(#2801).
β 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
enumerate_instructions() (#2720)Instruction (like dis3 does) (#2423)Included 3rd-party libraries
pefile and macholib, use the releases from PyPI.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
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.
π Fixed the following issues:
pefile with pyinstaller. This partiallyobjcopy to create a valid ELF file (#1812, #1831)_FORTIFY_SOURCE (#1820)isatty() for our dummy NullWriter (#1883)pefile, use package from for windows (#1357)Known Issues