PySimpleGUI is a Python package that enables creating simple, cross-platform GUIs with ease. It wraps tkinter, Qt, WxPython, and Remi (web) into a unified API. Current version is 6.0, released in 2026 under LGPL3. New major version with significant API changes and improved theming.
Install & Compatibility
Where this runs
tested against v6.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.7MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
PySimpleGUI
✓ import PySimpleGUI as sg
✗ from PySimpleGUI import *
Common mistake: wildcard imports can pollute namespace and hide errors. Always use 'import PySimpleGUI as sg'.
sg.Window
✓ import PySimpleGUI as sg; sg.Window(...)
✗ from PySimpleGUI import Window; Window(...)
Recommended pattern is to use sg prefix; direct imports may cause confusion with other libraries.
Creates a simple window with a text and a button. Uses the standard event loop pattern.
import PySimpleGUI as sg
layout = [[sg.Text('Hello from PySimpleGUI')],
[sg.Button('OK')]]
window = sg.Window('Demo', layout)
while True:
event, values = window.read()
if event == sg.WIN_CLOSED or event == 'OK':
break
window.close()
Errors
Common errors & fixes
AttributeError: module 'PySimpleGUI' has no attribute 'Window'
Typo or incorrect import. Common mistake: installing 'pysimplegui' (lowercase) instead of 'PySimpleGUI' (capital letters).
fixEnsure you installed PySimpleGUI with correct casing: pip install PySimpleGUI (case-sensitive on some systems). Then use import PySimpleGUI as sg.
NameError: name 'sg' is not defined
Forgot to import or used wrong import alias.
fixAdd 'import PySimpleGUI as sg' at the top of your script.
Audit
Dependencies
No dependency data recorded yet.