Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New click library version (8.1.0) breaks spaCy #10564

Closed
WBrandes opened this issue Mar 28, 2022 · 10 comments
Closed

New click library version (8.1.0) breaks spaCy #10564

WBrandes opened this issue Mar 28, 2022 · 10 comments
Labels
bug Bugs and behaviour differing from documentation install Installation issues third-party Third-party packages and services

Comments

@WBrandes
Copy link

WBrandes commented Mar 28, 2022

How to reproduce the behaviour

Trying to import spaCy in a python terminal, or trying to download a model through the command line (python -m spacy download en_core_web_trf), gives:

ImportError: cannot import name 'get_terminal_size' from 'click.termui

Only ran into this because I just made a new AWS instance, and it installed the newest version of click, which was updated about an hour ago (just my luck). When I re-installed click as version 8.0.4 spaCy runs fine, but I expect anyone doing a clean install of Python will run into this issue.

Your Environment

  • Operating System: Amazon Linux
  • Python Version Used: 3.9.6
  • spaCy Version Used: 3.2.3
@NikitaKamzeev
Copy link

I have the same issue with spaCy==3.2.0, python==3.7.10 and Amazon linux Operating System.

@philgooch
Copy link

According to the click 8.1.0 Release Notes: get_terminal_size is removed, use shutil.get_terminal_size instead.

@Mayank-Bhatia
Copy link

Mayank-Bhatia commented Mar 29, 2022

So what's the solution in the meantime, use older version of click after installing spacy?

@Mayank-Bhatia
Copy link

RUN pip uninstall click -y && pip install "click<8" in my Dockerfile seems to do the trick.

@polm
Copy link
Contributor

polm commented Mar 29, 2022

Thanks for the reports everyone! I would say for the time being please downgrade click. We'll work on having a patch out for this soon if necessary, thought it looks like it might be addressed upstream.

@philgooch
Copy link

Adding click==8.0.4 at the end of my requirements.txt works for me. Alternatively, adding pip install click==8.0.4 within the Dockerfile after installing other dependencies also works.

@svlandeg svlandeg added bug Bugs and behaviour differing from documentation install Installation issues third-party Third-party packages and services labels Mar 29, 2022
@svlandeg
Copy link
Member

@svlandeg
Copy link
Member

As the upstream issue is not fixed yet, we released v3.2.4 to deal with this issue.

@tiangolo
Copy link
Contributor

Hello! I just released Typer 0.4.1, you can now upgrade the version and that should handle it. 🚀 🤓

@github-actions
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bugs and behaviour differing from documentation install Installation issues third-party Third-party packages and services
Projects
None yet
Development

No branches or pull requests

7 participants