{"id":992,"library":"jupyter-server-terminals","title":"Jupyter Server Terminals","description":"Jupyter Server Terminals is a Jupyter Server Extension that provides robust terminal support within the Jupyter environment. It allows users to run system shells directly in their web browser, offering functionalities akin to a local terminal. The library is actively maintained, with regular releases focusing on bug fixes and maintenance, and is currently at version 0.5.4. It requires Python >=3.8.","status":"active","version":"0.5.4","language":"python","source_language":"en","source_url":"https://github.com/jupyter-server/jupyter_server_terminals","tags":["jupyter","terminal","server extension","command line","web UI"],"install":[{"cmd":"pip install jupyter_server_terminals","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"This is a Jupyter Server extension and requires Jupyter Server to function.","package":"jupyter-server","optional":false},{"reason":"Provides the backend for terminal emulation and websocket communication.","package":"terminado","optional":false}],"imports":[{"note":"Users typically interact with terminals via the Jupyter web interface after installing the extension. For advanced server-side configuration, one would interact with the Jupyter Server's extension management system, not direct imports from jupyter_server_terminals.","symbol":"Extension configuration","correct":"This library is primarily a Jupyter Server extension. Direct Python imports for programmatic end-user terminal creation or management are not its primary interface. Its functionality is exposed via the Jupyter Server and its web UI (JupyterLab/Notebook)."}],"quickstart":{"code":"pip install jupyter_server_terminals jupyterlab\njupyter lab","lang":"bash","description":"Install the `jupyter_server_terminals` extension along with `jupyterlab` (or `notebook`). Once installed, start JupyterLab from your terminal. The terminal functionality will be automatically available within the JupyterLab interface. You can open a new terminal from the Launcher or through the File menu."},"warnings":[{"fix":"Upgrade your `jupyter-server` installation to version 2.0 or higher: `pip install --upgrade jupyter-server`.","message":"Jupyter Server Terminals versions 0.5.0 and newer explicitly require Jupyter Server 2.0+ to function correctly. Older versions of Jupyter Server will result in an error during extension loading.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Be aware of this architectural change if you're developing extensions that interact directly with Jupyter Server services or managing custom deployments. The service can now be managed as a standard Jupyter extension.","message":"The 'Terminals Service' transitioned from a core Jupyter Service to a Jupyter Server extension in Jupyter Server 2.0. While most end-users won't notice, this impacts how the service is managed and can be optionally disabled, which is relevant for sensitive deployment environments or advanced configurations.","severity":"gotcha","affected_versions":"All versions with Jupyter Server >=2.0"},{"fix":"Always close and halt notebooks (`File > Close and Halt`) and exit terminals (`exit` command) when not in use. Minimize the number of open tabs and avoid printing excessively large outputs. Re-use variables instead of creating multiple copies of large data in memory.","message":"Jupyter environments (including terminals) can suffer from memory issues, leading to unresponsive sessions or saving errors. This is often due to poor 'server hygiene,' such as not closing notebooks/terminals, excessive output, or inefficient code.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If experiencing conflicts, consider changing the keyboard shortcut for either copy or the command palette in JupyterLab's settings. Alternatively, use Ctrl+Shift+V for paste, which works as usual, or hold Shift and right-click for the native browser context menu (though this may not work in all browsers).","message":"On *nix shells in JupyterLab, the default keyboard shortcut for copying (Ctrl+Shift+C) can conflict with the default shortcut for toggling the command palette (`apputils:activate-command-palette`).","severity":"gotcha","affected_versions":"All versions in JupyterLab"},{"fix":"Execute `pip install` commands in a shell environment (e.g., command line, shell script, or via `subprocess` in Python), not as direct Python code within a `.py` file.","message":"The test script failed with a `SyntaxError` because `pip install` was used as a Python statement. `pip install` is a shell command and cannot be run directly as Python code within a script. This prevents the library from being installed and evaluated.","severity":"breaking","affected_versions":"All versions (execution environment issue)"},{"fix":"Ensure shell commands are run in a shell environment (e.g., your terminal) or use Python's `subprocess` module to execute them programmatically from within a script. For package installation, run `pip install <package_names>` in your command line interface before executing your Python script.","message":"The test or installation script attempted to execute a shell command (e.g., `pip install`) directly within a Python script, leading to a `SyntaxError`. This prevents the specified libraries from being installed and the rest of the script from running.","severity":"breaking","affected_versions":"All versions (of scripts attempting this execution method)"}],"env_vars":null,"last_verified":"2026-05-12T22:19:38.030Z","next_check":"2026-06-27T00:00:00.000Z","problems":[{"fix":"Upgrade your `jupyter-server` installation to version 2.0 or newer using `pip install --upgrade jupyter-server` or `conda update jupyter-server`.","cause":"This error occurs when `jupyter-server-terminals` is installed with an older version of `jupyter-server` that does not meet the minimum requirement of 2.0+.","error":"RuntimeError: Jupyter Server Terminals requires Jupyter Server 2.0+"},{"fix":"Ensure `jupyter-server-terminals` is installed and enabled. Run `pip install jupyter-server-terminals` (or `conda install jupyter-server-terminals -c conda-forge`) and then `jupyter server extension enable jupyter_server_terminals`.","cause":"This message, often seen in the browser console, indicates that the Jupyter server-side component for terminals is either not installed, not enabled, or its configuration cannot be found, preventing the client from utilizing terminal functionality.","error":"Disabling terminals plugin because they are not available on the server."},{"fix":"Try reinstalling `jupyter-server` and `jupyter-server-terminals` in a clean virtual environment: `pip uninstall jupyter-server jupyter-server-terminals && pip install jupyter-server jupyter-server-terminals`. Also, ensure all Jupyter-related packages are up-to-date and compatible.","cause":"A '500 Internal Server Error' when interacting with terminals often points to a broader issue with the Jupyter server environment, possibly due to corrupted installations, dependency conflicts (e.g., `tornado` version mismatches), or misconfigurations preventing the server from handling requests correctly.","error":"500 Internal Server Error"},{"fix":"Check for network connectivity issues, verify any proxy configurations (especially in a JupyterHub environment), and ensure the Jupyter server is running without errors in its logs. Sometimes restarting the Jupyter server can resolve transient connection problems.","cause":"This error signifies a failure in the real-time communication channel between the client (browser) and the Jupyter server, which is essential for interactive terminals, often due to network issues, proxy misconfigurations, or an improperly running Jupyter server.","error":"WebSocket connection failed"}],"ecosystem":"pypi","meta_description":null,"install_score":0,"install_tag":"stale","quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.5.4","cli_name":"","install_checks":{"last_tested":"2026-05-12","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"21.5M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.9,"import_time_s":null,"mem_mb":null,"disk_size":"22M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"24.3M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":2,"import_time_s":null,"mem_mb":null,"disk_size":"25M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"15.9M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.8,"import_time_s":null,"mem_mb":null,"disk_size":"16M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"15.7M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":1.8,"import_time_s":null,"mem_mb":null,"disk_size":"16M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"21.0M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":"wheel","failure_reason":null,"install_time_s":2.2,"import_time_s":null,"mem_mb":null,"disk_size":"21M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":1,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]},"quickstart_checks":{"last_tested":"2026-04-24","tag":null,"tag_description":null,"results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}}