Guide · Open source
How to use DearPyGui: install, first window and demo
Updated · written with AI from the project's own documentation and checked against our catalogue data
DearPyGui is an open-source graphical user interface toolkit for Python. It lets you build windows, buttons, text inputs, sliders and plots from ordinary Python code, and it is a good fit for quick tools and control panels around scripts. This guide shows you how to install it, run a first working window, explore the built-in demo and decide whether it suits your project.
Quick start
- 1Check your Python version. Confirm you have Python 3.8 64-bit or newer installed.
- 2Install the package. Run pip install dearpygui, or pip3 install dearpygui if pip points to another Python.
- 3Create a script. Save the README example as a .py file, such as first_app.py.
- 4Run the script. Start the file with Python to open a window with a text label, button, text input and slider.
- 5Add your own widgets. Add more widgets inside a dpg.window block and attach callback functions to buttons.
- 6Open the demo. Run python -m dearpygui.demo to see the full set of widgets and read the demo source for patterns.
What you need before you install DearPyGui
DearPyGui needs Python 3.8 64-bit or newer. The README lists Windows, Linux and macOS as supported platforms, plus Raspberry Pi 4.
It is built on Dear ImGui and uses your computer's GPU for rendering, with the core written in C/C++.
- Python 3.8 64-bit or newer
- Windows, Linux, macOS or Raspberry Pi 4
Install DearPyGui with pip
Install DearPyGui from the Python package index using pip. If pip points to a different Python installation, use pip3 instead, as the README suggests for systems where pip refers to Python 2 or another install.
pip install dearpygui
# or, on systems where pip points to a different Python:
pip3 install dearpyguiBuild and run your first window
The README's basic example creates a context, a viewport and a window with a text label, a button with a callback, a text input and a float slider. The callback prints a message when the button is clicked.
Save the script as a .py file and run it with Python. The order matters: create the context, create the viewport, set up Dear PyGui, add your widgets, show the viewport, start the main loop, then destroy the context when finished.
- dpg.create_context() starts Dear PyGui
- dpg.create_viewport() creates the window that holds your interface
- dpg.setup_dearpygui() prepares the renderer
- Widgets such as add_text, add_button, add_input_text and add_slider_float are added inside a dpg.window block
- dpg.start_dearpygui() runs the event loop
import dearpygui.dearpygui as dpg
def save_callback():
print("Save Clicked")
dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()
with dpg.window(label="Example Window"):
dpg.add_text("Hello world")
dpg.add_button(label="Save", callback=save_callback)
dpg.add_input_text(label="string")
dpg.add_slider_float(label="float")
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()Explore the built-in demo
The built-in demo shows the library's features. Run it with the module command below. The demo's Python code is available in the repository, so you can read it and reuse its patterns in your own app.
The README also points to the official documentation and tutorials, plus community examples and showcase apps.
- Read the demo source to see how each widget is used
- Check the documentation tutorials for step-by-step material
- Browse community snippets and showcase apps linked from the README
python -m dearpygui.demoFeatures to know about: themes, plots and node editor
DearPyGui offers complete theme and style control, which is useful if you want a custom look. Its graphing support is designed for large data: the README says it can display over 1 million datapoints at 60 fps, with zoom and pan.
The toolkit also includes a node editor and developer tools for theme and resource inspection, runtime metrics and a debugger. The look is custom rather than native, so the interface will not match standard OS widgets.
- Theme and style control
- Fast graphs with zoom and pan
- Node editor
- Developer tools: theme and resource inspection, runtime metrics, debugger
What people use it for
- A control panel that starts, stops and monitors a Python script
- An internal tool with buttons, text inputs and sliders for setting parameters
- A plotting window for quickly viewing large datasets
- A prototype node-based editor using the built-in node editor
Frequently asked questions
Is DearPyGui free to use?
Yes. DearPyGui is licensed under the MIT License, as stated in the README. You can read the full license file in the repository.
What are the system requirements for DearPyGui?
The README requires Python 3.8 64-bit or newer. It lists Windows 10 with DirectX 11, macOS with Metal, Linux with OpenGL 3, and Raspberry Pi 4 with OpenGL ES as supported platforms.
How do I install DearPyGui?
Run pip install dearpygui in a terminal. If that command uses a different Python, run pip3 install dearpygui instead.
Can DearPyGui make native-looking apps?
Not really. The README describes a custom immediate-mode look, so the interface will not match standard OS widgets. If native appearance is required, consider a toolkit such as Tkinter, PyQt, Kivy or wxPython.
Can I use DearPyGui for web or mobile apps?
No. The README lists only Windows, Linux, macOS and Raspberry Pi 4, so web-based and mobile projects are outside its scope.
How does DearPyGui compare to Tkinter or PyQt?
DearPyGui is built on Dear ImGui and focuses on fast, data-heavy graphs and custom themes. Tkinter, PyQt, Kivy and wxPython are other Python GUI options; the README does not compare them directly, so test the options against your own needs.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
DearPyGui suits Python developers who want a fast desktop GUI for a script, control panel or data-heavy plot and are happy with a custom look. If you need a native-looking application, or a web or mobile app, pick a different toolkit such as PyQt, wxPython, Kivy or Tkinter.
Install options & downloads