Environment
- OS: Windows 10 (also likely affects Windows 11)
- Python: 3.12
- google-colab-cli: 0.6.0
- Installed using: uv tool install google-colab-cli
Description
The CLI installs successfully, but every command immediately crashes before execution.
Example:
colab --help
Traceback ends with:
ModuleNotFoundError: No module named 'termios'
The import chain is:
colab_cli.cli
-> colab_cli.commands.execution
-> colab_cli.console
-> import termios
colab_cli/console.py imports the Unix-only modules termios and tty at module import time.
Because execution.py imports connect_console eagerly, the CLI crashes on startup on Windows, even for commands that do not require an interactive terminal (such as upload, download, or run).
Expected behavior
Commands that do not require a TTY should work on Windows.
The console implementation could either:
- lazily import
connect_console only when needed, or
- conditionally import the POSIX-specific modules.
Reproduction
- Install
google-colab-cli v0.6.0
- Run:
colab --help
- Observe:
ModuleNotFoundError: No module named 'termios'
Environment
Description
The CLI installs successfully, but every command immediately crashes before execution.
Example:
colab --help
Traceback ends with:
ModuleNotFoundError: No module named 'termios'
The import chain is:
colab_cli.cli
-> colab_cli.commands.execution
-> colab_cli.console
-> import termios
colab_cli/console.pyimports the Unix-only modulestermiosandttyat module import time.Because
execution.pyimportsconnect_consoleeagerly, the CLI crashes on startup on Windows, even for commands that do not require an interactive terminal (such asupload,download, orrun).Expected behavior
Commands that do not require a TTY should work on Windows.
The console implementation could either:
connect_consoleonly when needed, orReproduction
google-colab-cliv0.6.0colab --help
ModuleNotFoundError: No module named 'termios'