Skip to content

Fix click dependency issue (#13971) - #13973

Merged
honnibal merged 2 commits into
explosion:masterfrom
mart-r:fix-click-dep-issue-13971
Aug 6, 2026
Merged

honnibal merged 2 commits into
explosion:masterfrom
mart-r:fix-click-dep-issue-13971

Conversation

@mart-r

@mart-r mart-r commented May 29, 2026

Copy link
Copy Markdown
Contributor

This fixes issue #13971 that causes a spacy import to fail after a fresh install if/when click isn't available.

Description

This PR just adds a click dependency to requirements.txt as well as setup.cfg.
I added it to next to typer in both since that's what previously pulled it in.

Again, this is to fix #13971

Types of change

Fix of a dependency issue

Checklist

  • I confirm that I have the right to submit this contribution under the project's MIT license.
  • I ran the tests, and all new and existing tests passed.
  • My changes don't require a change to the documentation, or if they do, I've added all required information.

@D3X

D3X commented Jun 8, 2026

Copy link
Copy Markdown

typer now vendors click, so I suppose it would make sense to update the imports instead of adding another dependency

Here's my PR with that change: #13976

@svlandeg svlandeg left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably the best option right now to ensure installs don't break.

But, @D3X is correct in his comment that the exception class won't match anymore. These are internals subject to change in the near future in Typer though, so I strongly advise against importing from typer/_click.

So either merge this PR (and perhaps update again when the relevant Typer internals have stabilized), or rework the relevant features here in spaCy that do not rely on Click anymore (I haven't looked in detail at those).

Matt/Ines, let me know if you want to discuss in more detail, happy to help!

@honnibal
honnibal merged commit dbe520e into explosion:master Aug 6, 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.

spacy fails to specify click as a dependency even though it is being used and thus fresh install + import fails

5 participants