pyinstaller-versionfile
raw JSON → 3.1.0 verified Fri May 01 auth: no python
Creates Windows version-info files for PyInstaller from a YAML metadata file or from an installed distribution's metadata. Current version: 3.1.0. Release cadence: irregular.
pip install pyinstaller-versionfile Common errors
error ModuleNotFoundError: No module named 'pyinstaller-versionfile' ↓
cause Trying to use a hyphen in the import statement instead of an underscore.
fix
Use 'from pyinstaller_versionfile import create_version_file' (underscore, not hyphen).
error TypeError: create_version_file() missing 1 required positional argument: 'version' ↓
cause Missing required 'version' argument.
fix
Provide the 'version' parameter (string) when calling 'create_version_file'.
error ValueError: The 'translations' parameter must be a list of strings. ↓
cause Non-list or non-string value provided for 'translations'.
fix
Pass 'translations' as a list of hex locale strings, e.g., translations=["040904B0"].
Warnings
breaking In v3.0.0, the module name changed from 'pyinstaller_versionfile' to 'pyinstaller_versionfile' (same), but the import path 'pyinstaller_versionfile' remains. No breaking import change, but the internal API was overhauled. If you used 'Metadata' class prior to v3.0, it may have been renamed or its methods changed. ↓
fix Check the changelog for v3.0.0 migration steps. For v3.x, use the new 'create_version_file' function or 'Metadata' builder.
gotcha The package name on PyPI is 'pyinstaller-versionfile' (with hyphen), but the Python module uses underscores: 'pyinstaller_versionfile'. Using a hyphen in an import statement fails. ↓
fix Import using 'from pyinstaller_versionfile import ...', not 'from pyinstaller-versionfile import ...'.
gotcha The 'translations' parameter expects a list of strings in hex locale format (e.g., '040904B0'). Incorrect formatting results in a malformed version file. ↓
fix Use a list of valid locale hex codes. A common example is ["040904B0"] for English (United States) with Windows CP1252 charset.
Imports
- create_version_file wrong
from pyinstaller_versionfile import create_version_filecorrectfrom pyinstaller_versionfile import create_version_file - Metadata
from pyinstaller_versionfile import Metadata
Quickstart
from pyinstaller_versionfile import create_version_file
create_version_file(
output_file="version_info.txt",
version="1.0.0",
company_name="My Company",
file_description="My App",
internal_name="myapp",
legal_copyright="Copyright 2025 My Company",
original_filename="myapp.exe",
product_name="My App",
translations=["040904B0"] # US English, Windows CP1252
)