ncar-xdev / jupyter-forward

Launch Jupyter Lab over SSH with a single command!
https://jupyter-forward.readthedocs.io/
Apache License 2.0
31 stars 12 forks source link

ModuleNotFoundError: No module named 'click._bashcomplete' #91

Closed andersy005 closed 2 years ago

andersy005 commented 3 years ago

The latest version of click: 8.0.1 breaks typer which is one of our dependencies (see https://github.com/tiangolo/typer/issues/278)

(playground) ➜  ~ jupyter-forward --help
Traceback (most recent call last):
  File "/Users/abanihi/.mambaforge/envs/playground/bin/jupyter-forward", line 6, in <module>
    from jupyter_forward.cli import main
  File "/Users/abanihi/.mambaforge/envs/playground/lib/python3.9/site-packages/jupyter_forward/cli.py", line 4, in <module>
    import typer
  File "/Users/abanihi/.mambaforge/envs/playground/lib/python3.9/site-packages/typer/__init__.py", line 31, in <module>
    from .main import Typer, run
  File "/Users/abanihi/.mambaforge/envs/playground/lib/python3.9/site-packages/typer/main.py", line 11, in <module>
    from .completion import get_completion_inspect_parameters
  File "/Users/abanihi/.mambaforge/envs/playground/lib/python3.9/site-packages/typer/completion.py", line 10, in <module>
    import click._bashcomplete
ModuleNotFoundError: No module named 'click._bashcomplete'

The current workaround is to downgrade click to an earlier version

mamba install 'click<8'
tiangolo commented 3 years ago

I just released Typer 0.4.0, which is compatible with both Click 7 and Click 8. :tada:

Upgrading the dependency of Typer should handle the problem.

andersy005 commented 3 years ago

Thank you for the heads-up, Sebastián!