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

Using python lib typer throws an error.

some of the depended stacktrace:

   ...
  import typer
  File "/builds/.../.venv/lib/python3.9/site-packages/typer/__init__.py", line 12, in <module>
  from click.termui import get_terminal_size as get_terminal_size
ImportError: cannot import name 'get_terminal_size' from 'click.termui' (/builds/.../.venv/lib/python3.9/site-packages/click/termui.py)


Solution 1:[1]

Ah sry, i had to update to the latest version 0.4.1.

Depended pr: https://github.com/tiangolo/typer/pull/375

(Only leave this answer if anyone makes the same mistake.)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 zerocewl