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

Clearly document requirement for pyviz_comms in JupyterLab environment #5965

Closed
MatusGasparik opened this issue Dec 1, 2023 · 6 comments
Closed
Labels
type: docs Related to the Panel documentation and examples
Milestone

Comments

@MatusGasparik
Copy link

ALL software version info

  • panel: 1.3.4
  • param: 2.0.1
  • jupyterlab: 4.0.8
  • python: 3.11.6
  • Browser: Chrome 119.0.6045.199 (arm64)

Description of expected behavior and the observed behavior

Creating UI widgets from param.Parametrized instances with parameter dependencies declared with the param.depends does NOT work - i.e. changing the params in the UI has no effect.

I'm genuinely puzzled by what I'm missing...

Complete, minimal, self-contained example code that reproduces the issue

Example from the docs ()

import param
import panel as pn

print('param:', param.__version__)
print('panel:', pn.__version__)

pn.extension()


class Mul(param.Parameterized):
    a = param.Number(5,  bounds=(-100, 100))
    b = param.Number(-2, bounds=(-100, 100))

    @param.depends('a', 'b')
    def view(self):
        return str(self.a*self.b)

    def view2(self):
        return str(self.a*self.b)

prod = Mul(name='Multiplier')
pn.Row(prod.param, prod.view)

Stack traceback and/or browser JavaScript console output

  • no errors

Screenshots or screencasts of the bug in action

Bildschirmaufnahme.2023-12-01.um.11.04.58.mov
@hoxbro
Copy link
Member

hoxbro commented Dec 1, 2023

Your example code works for me. What is your version of jupyterlab and pyviz_comms?

@MatusGasparik
Copy link
Author

MatusGasparik commented Dec 1, 2023

Thanks, @hoxbro for the very quick response. The JuperLab is v4.0.8.

Running jupter labexternsion list show no pyviz_comms... Am I missing the extension? I am going through the docs to see if I missed sth...

@hoxbro
Copy link
Member

hoxbro commented Dec 1, 2023

pyviz_comms is a python package

@MatusGasparik
Copy link
Author

Thanks, that fixed the issue. I missed this step (but also couldn't find any mention in the panel docs...)

@philippjfr philippjfr changed the title Panel UI not updating in JupyterLab Clearly document requirement for pyviz_comms in JupyterLab environment Dec 1, 2023
@philippjfr philippjfr added the type: docs Related to the Panel documentation and examples label Dec 1, 2023
@philippjfr philippjfr reopened this Dec 1, 2023
@philippjfr philippjfr added this to the v1.4.0 milestone Dec 1, 2023
@hoxbro
Copy link
Member

hoxbro commented Dec 2, 2023

I'm not completely sure what is needed as pyviz_comms is a required dependency of panel.

@philippjfr
Copy link
Member

If you install JupyterLab in a separate env from the kernel that panel is installed in then you need to make sure that pyviz_comms is explicitly installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Related to the Panel documentation and examples
Projects
None yet
Development

No branches or pull requests

3 participants