{"id":27015,"library":"glances","title":"Glances","description":"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.","status":"active","version":"4.5.4","language":"python","source_language":"en","source_url":"https://github.com/nicolargo/glances","tags":["monitoring","curses","system-information","cross-platform","performance"],"install":[{"cmd":"pip install glances","lang":"bash","label":"Install with pip"},{"cmd":"pip install glances[all]","lang":"bash","label":"Install with all plugins/deps"}],"dependencies":[{"reason":"Core system statistics","package":"psutil","optional":false},{"reason":"Network interface information (replaces netifaces in v4.3.1+)","package":"netifaces-plus","optional":false},{"reason":"Docker container monitoring","package":"docker","optional":true},{"reason":"SNMP support","package":"pysnmp","optional":true},{"reason":"InfluxDB export (v1/v2)","package":"influxdb","optional":true},{"reason":"InfluxDB 3 export (v4.3.2+)","package":"influxdb-client","optional":true}],"imports":[{"note":"In v4.4.0, the new Python API requires importing the Glances class. Direct module import no longer works as a library.","wrong":"import glances","symbol":"Glances","correct":"from glances import Glances"}],"quickstart":{"code":"from glances import Glances\n\n# Run Glances in standalone mode (non-blocking example)\nglances = Glances()\n# Start monitoring (blocking in CLI mode, or use config)\n# In library mode, you typically call glances.start()\nprint(\"Glances library loaded successfully\")\n","lang":"python","description":"Minimal example using the Glances library API (v4.4.0+). For system monitoring, use the command-line tool 'glances' directly."},"warnings":[{"fix":"Replace 'import glances' with 'from glances import Glances' and create a Glances instance.","message":"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.","severity":"breaking","affected_versions":">=4.4.0"},{"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.","message":"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).","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Update dependency to 'netifaces-plus' if you install plugins manually.","message":"The 'netifaces' dependency has been replaced by 'netifaces-plus' in v4.3.1. Old requirements.txt may break.","severity":"deprecated","affected_versions":">=4.3.1"},{"fix":"Run with 'glances -t' (text output) or 'glances -w' (web server) on systems without a TTY.","message":"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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install with 'pip install glances'. Ensure you are using the correct Python environment (e.g., not using system Python if in a virtualenv).","cause":"Glances is not installed or Python environment is incorrect.","error":"ModuleNotFoundError: No module named 'glances'"},{"fix":"Upgrade to Glances >=4.4.0: 'pip install --upgrade glances'","cause":"Trying to use the new library API with an older version (<4.4.0) that does not have the Glances class.","error":"ImportError: cannot import name 'Glances' from 'glances'"},{"fix":"Install curses: On Debian/Ubuntu: 'apt-get install libncurses-dev'. On Windows, use Windows Terminal or set environment variable TERM=vt100.","cause":"Terminal missing curses support (common on minimal containers or Windows).","error":"Fatal Python error: Cannot load libcurses"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}