Skip to content

Fails to open libtk8.6.so on Ubuntu 22.04 when bundled with PyInstaller #746

@johnthagen

Description

@johnthagen

We have a PyInstaller binary that we are building that opens a tk.TopLevel dialog.

When the executable is launched on Ubuntu 22.04, at the line

import tkinter as tk

The follow exception is raised:

  File "PyInstaller/loader/pyimod02_importers.py", line 457, in exec_module
  File "tkinter/__init__.py", line 38, in <module>
ImportError: libtk8.6.so: cannot open shared object file: No such file or directory

On Ubuntu 24.04, it does work.

CC @geofft , perhaps related to

Motivation

We'd like to make our binaries as portable as possible, and python-build-standalone has a low GLIBC requirement that helps with this.

Environment

  • Python 3.13.6 (python-build-standalone)
  • pyinstaller v6.15.0
  • pyinstaller-hooks-contrib v2025.8
  • Build environment: rockylinux:8 container
    • uv 0.8.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions