Is interaction between Panel widgets and plots depending on Jupyter Notebook?

Hi! I would like to ask a general question, I spent a very long time trying to make my dashboard interact with widgets using editors like pycharm and VsCode, but nothing seems to work, and weirdly my code work just fine in a jupyter notebook, so I would like to know if the interaction between Panel widgets and plots depends on Jupyter Notebook? if not please give me an example.
Thanks in advance.

Hi Erik. I do know that Panel works in jupyter notebook and on server.

My understanding is that vs code and PyCharm notebook environments are different than jupyter notebook and this use case has not been supported yet because there has not been a lot of demand. And the HoloViz core developers dont use these themselves.

I believe i have a feature request for vs code support. You could make a similar one for PyCharm.

1 Like

THANK YOU @Marc, I thought that I’ve made a mistake, but now the vision is more clear to me.
I found Jupyter notebooks just awsome but when It comes to big applications, structuring files become difficult.

1 Like

My work flow is .py files and vs code. I then mark my app .show or .servable.

.show is good for integrated debugging in vs code.

.servable is good for panel serve with —dev parameter, which restarts the server when files change.

Then I also use the awesome panel designer which can reload the modules/ files you are developing when clicking on a button. You can load data once when you load. In that way you it works a bit like the notebook environment and you can quickly see changes.

1 Like

Thank you so much @Marc that’s so insightful, one last question, if we export our app as HTML report, we could not save interaction between widgets and plots?

1 Like

You should be able to save as HTML report no matter if notebook or server. Otherwise it’s a bug. (I believe).

1 Like

Yes, it’s exactly the case, when I mark my app .show my plots work interactively with widgets but when I saved the app as HTML , I lost interactions.

I’d clarify that supporting VSCode and PyCharm isn’t a matter of whether the developers use it, but more that those editors have not fully supported the sort of full bidirectional communication needed by Panel and HoloViews for synchronizing widgets between Python and JavaScript. Jupyter and Bokeh Server have always had that, and people are working on that for PyCharm and VSCode with some success, but such support is coming many, many years after it’s been available in Jupyter. We do have developers using VSCode, and have made some progress supporting VSCode already, but there’s still a ways to go! The last time we looked seriously at PyCharm we found that the embedded browser was woefully inadequate for rendering fully interactive objects, but that was a couple of years back, and I know JetBrains was aware of it and so they may have done something about it by now…