Skip to content

Declare click as a direct dependency - #174

Closed
Arseni10Lk wants to merge 1 commit into
Algorithmic-Battle:mainfrom
Arseni10Lk:fix-click-dependency
Closed

Arseni10Lk wants to merge 1 commit into
Algorithmic-Battle:mainfrom
Arseni10Lk:fix-click-dependency

Conversation

@Arseni10Lk

@Arseni10Lk Arseni10Lk commented Oct 2, 2026 •

Copy link
Copy Markdown

Declare click as a direct dependency

Problem

Following the installation instructions on the website currently produces a broken install:

uv tool install algobattle-base
algobattle --help

fails with:

Traceback (most recent call last):
  File "/home/<user>/.local/bin/algobattle", line 4, in <module>
    from algobattle.cli import app
  File ".../site-packages/algobattle/cli.py", line 22, in <module>
    from click import Choice
ModuleNotFoundError: No module named 'click'

Cause

algobattle/cli.py imports click directly, but click is not listed in the
package's dependencies. It was previously installed transitively through typer,
but recent typer releases no longer pull it in, so a fresh install resolves
without click and the CLI fails on import.

I found some other people facing the same issue: explosion/spaCy#13971

Fix

Add click to [project.dependencies] in pyproject.toml (via uv add click,
which also updates uv.lock).

Testing

  • Installed the tool from the local checkout with uv tool install --force .
  • algobattle --help now runs successfully

Workaround

Before it is merged, the CLI can be installed with:

uv tool install --force algobattle-base --with click

@ImogenBits

Copy link
Copy Markdown
Collaborator

The issue isn't algobattle transitively depending on click, but that uv is trying to install an older version of algobattle with a newer version of typer. I suspect that you have an existing uv install that only knows older Python versions and have set it to try to use one of those? Either way, what you want is to run uv tool install algobattle-base==4.4.1. The fix you proposed will not work and will result in a version of algobattle that is incompatible with the one the course is using.

I'll update the docs to include the version specifier to prevent this issue.

@ImogenBits ImogenBits closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants