Is just import tkinter on its own enough to trigger the issue? I’ve tried it in a Void Linux (and I blindly assumed glibc rather than musl based?) docker container and I’m seeing no signs of trouble.
> docker run --network=host -v(pwd):/io -it ghcr.io/void-linux/void-linux:latest-mini-x86_64 # xbps-install -Syu xbps bash # bash bash-5.2# cd /io/ bash-5.2# xbps-install -y python3-xlib python3-six python3-tkinter binutils bash-5.2# python -m venv --system-site-packages env bash-5.2# . ./env/bin/activate (env) bash-5.2# python -m pip install -U pip wheel setuptools (env) bash-5.2# pip install pyinstaller (env) bash-5.2# pip freeze altgraph==0.17.4 packaging==24.0 pyinstaller==6.5.0 pyinstaller-hooks-contrib==2024.3 python-xlib==0.33 setuptools==69.2.0 six==1.16.0 wheel==0.43.0 (env) bash-5.2# echo 'import tkinter; print("I have not crashed!")' > test.py (env) bash-5.2# pyinstaller test.py (env) bash-5.2# ./dist/test/test I have not crashed!I also did not have the wheel package in my pip packages. Is that required? It looks like a packaging format.
It prevents pip from installing .sdist packages in the broken legacy mode (a.k.a. eggs/zipped eggs). Pip has since changed that behaviour so its need should become less prominent with time as people stop using versions of pip that predate that change. In this case, all packages were already in .whl format so removing wheel wouldn’t have done any harm.