Skip to content

Windows: google-colab-cli v0.6.0 crashes on startup due to unconditional termios import #78

Description

@spinx66

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

  1. Install google-colab-cli v0.6.0
  2. Run:

colab --help

  1. Observe:

ModuleNotFoundError: No module named 'termios'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions