Glances
raw JSON → 4.5.4 verified Mon Apr 27 auth: no python
A cross-platform curses-based monitoring tool that provides a comprehensive overview of system resources including CPU, memory, disk, network, processes, sensors, containers, and more. Version 4.5.4 supports Python >=3.10. Released approximately quarterly with active maintenance.
pip install glances Common errors
error ModuleNotFoundError: No module named 'glances' ↓
cause Glances is not installed or Python environment is incorrect.
fix
Install with 'pip install glances'. Ensure you are using the correct Python environment (e.g., not using system Python if in a virtualenv).
error ImportError: cannot import name 'Glances' from 'glances' ↓
cause Trying to use the new library API with an older version (<4.4.0) that does not have the Glances class.
fix
Upgrade to Glances >=4.4.0: 'pip install --upgrade glances'
error Fatal Python error: Cannot load libcurses ↓
cause Terminal missing curses support (common on minimal containers or Windows).
fix
Install curses: On Debian/Ubuntu: 'apt-get install libncurses-dev'. On Windows, use Windows Terminal or set environment variable TERM=vt100.
Warnings
breaking Python API changed in v4.4.0: the old 'import glances' approach no longer works as a library. Use 'from glances import Glances' and instantiate the Glances class. ↓
fix Replace 'import glances' with 'from glances import Glances' and create a Glances instance.
gotcha Security: Glances web server and REST API are unauthenticated by default. Starting v4.5.2, a warning is shown, but mitigation requires explicit configuration (e.g., use a reverse proxy with auth). ↓
fix Do not expose the web server to the internet without authentication. Use environment variables GLANCES_USERNAME and GLANCES_PASSWORD (or config file) to enable basic auth. For the REST API, disable it or restrict access.
deprecated The 'netifaces' dependency has been replaced by 'netifaces-plus' in v4.3.1. Old requirements.txt may break. ↓
fix Update dependency to 'netifaces-plus' if you install plugins manually.
gotcha On headless systems (no display), Glances may crash if curses fails to initialize. Use '-t' for a text-only output or run in web server mode. ↓
fix Run with 'glances -t' (text output) or 'glances -w' (web server) on systems without a TTY.
Install
pip install glances[all] Imports
- Glances wrong
import glancescorrectfrom glances import Glances
Quickstart
from glances import Glances
# Run Glances in standalone mode (non-blocking example)
glances = Glances()
# Start monitoring (blocking in CLI mode, or use config)
# In library mode, you typically call glances.start()
print("Glances library loaded successfully")