mwcraig / ipyevents

A custom widget for returning mouse and keyboard events to Python. Documentation:
https://ipyevents.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
115 stars 27 forks source link

Compatible with Jupyter Hub ? #72

Open dastoqc opened 2 years ago

dastoqc commented 2 years ago

We are using TLJH on our teaching stations for several students to access and run their notebooks. We have been using ipyevents <0.9 without issue on it, but it seems that version >2 doesn't run on it. Can you help us fix the compatibility issue? Is it that same as with Jupyter Lab <3?

Thank you.

peter-ch commented 2 years ago

I'm also experiencing this problem with the latest JupyterLab and ipyevents. But it works in the old Jupyter notebook.

mwcraig commented 2 years ago

@dastoqc @peter-ch -- I'm glad to hear ipyevents has been useful. Can you please let me know what jupyterlab and ipyevents versions you are using?

My expectation is that ipyevents 2.0. and up will work with jupyterlab 3 and up, and ipyevents less than 1 will work with older versions of jupyterlab.

dastoqc commented 2 years ago

@mwcraig - We are not using JupyterLab but rather TLJH (Jupyter Hub) : https://tljh.jupyter.org/en/latest/. Our environment is set for Python 3.9 and we tried ipyevents 2.0.1 without success.

mwcraig commented 2 years ago

@dastoqc -- can you open a terminal and let me know what you get for conda list jupyter? Behind the scenes TLJH should be running either jupyter notebook or jupyter lab. I think it defaults to jupyter lab 2, but am not sure.

dastoqc commented 2 years ago

Here's the ouput of conda list jupyter:

# Name                    Version                   Build  Channel
jupyter-client            7.0.6                    pypi_0    pypi
jupyter-core              4.9.1                    pypi_0    pypi
jupyter-resource-usage    0.6.1                    pypi_0    pypi
jupyter-server            1.11.2                   pypi_0    pypi
jupyter-telemetry         0.1.0                    pypi_0    pypi
jupyterhub                1.5.0                    pypi_0    pypi
jupyterlab                3.2.5                    pypi_0    pypi
jupyterlab-pygments       0.1.2                    pypi_0    pypi
jupyterlab-server         2.8.2                    pypi_0    pypi
jupyterlab-widgets        1.0.2                    pypi_0    pypi
nteract-on-jupyter        2.1.3                    pypi_0    pypi
peter-ch commented 2 years ago

This is what jupyter --version returns on my machine:

Selected Jupyter core packages... IPython : 7.16.2 ipykernel : 5.5.6 ipywidgets : 7.6.3 jupyter_client : 7.1.0 jupyter_core : 4.9.1 jupyter_server : 1.13.1 jupyterlab : 3.2.9 nbclient : 0.5.9 nbconvert : 6.0.7 nbformat : 5.1.3 notebook : 6.4.6 qtconsole : 4.7.5 traitlets : 4.3.3

mwcraig commented 2 years ago

Finally coming back around to this. If this is still a problem, can you please let me know what sudo jupyter labextension list produces?

Apologies that this took so long...

twitwi commented 2 years ago

Same issue here (working in retro but not in lab and notebook). I dug to a solution which was to upgrade ipywidgets from 7.7.1 to 8.0.2.

I was initially trying with jupyterlite (and got the same issue)... so I need to find if there is a version 8 there.

twitwi commented 2 years ago

For the record this worked for jupyterlite:

cat jupyter_lite_config.json
{
  "LiteBuildConfig": {
    "contents": ["."],
    "federated_extensions": [
      "https://conda.anaconda.org/conda-forge/noarch/ipycanvas-0.13.1-pyhd8ed1ab_0.tar.bz2",
        "https://conda.anaconda.org/conda-forge/noarch/jupyterlab_widgets-3.0.3-pyhd8ed1ab_0.tar.bz2",
        "https://conda.anaconda.org/conda-forge/noarch/widgetsnbextension-4.0.3-pyhd8ed1ab_0.tar.bz2"
    ],
    "ignore_sys_prefix": ["federated_extensions", "mathjax"],
    "piplite_urls": [
      "https://files.pythonhosted.org/packages/py2.py3/i/ipycanvas/ipycanvas-0.13.1-py2.py3-none-any.whl",
      "https://files.pythonhosted.org/packages/py3/i/ipywidgets/ipywidgets-8.0.2-py3-none-any.whl",
      "https://files.pythonhosted.org/packages/py3/j/jupyterlab-widgets/jupyterlab_widgets-3.0.3-py3-none-any.whl",
      "https://files.pythonhosted.org/packages/py3/w/widgetsnbextension/widgetsnbextension-4.0.3-py3-none-any.whl"
    ]
  }
}