-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Render With Panel work with Different Kernels/Conda Environments in JupyterLab #3436
Comments
Thanks for the issue, I do not believe this to be possible to be honest. The "Preview" component works using a jupyter serverextension which by design has to run in the same environment as the Jupyter server. |
Thanks a lot for the response, closing the request as not possible! |
Honestly it does seem like it worth investigating. Maybe just maybe the server extension could determine the kernel set in the kernelspec of the notebook and somehow launch it and then execute the app in that context. So let's keep it open for now in case someone gets a chance to get investigate further. |
I have a reproducible runtime environment on Binder here https://mybinder.org/v2/gh/Ouranosinc/PAVICS-e2e-workflow-tests/47ef7b0c668acc84cb9c1c7cedc2f135aa54dd3a. Very similar problem, the green icon "Render with Panel" do not work with the notebook import panel as pn
pn.panel('# Ceci est un test').servable() That same trivial notebook work fine under the Panel launcher (https://github.com/holoviz/jupyter-panel-proxy), try it on my Binder link above. |
One thing I have noticed is that this seems to render fine when using the |
"Render with Panel" green button works fine for me know. Updating here in case this helps someone. There was 2 issues found: I had package My JupyterLab and Panel were not installed in the My JupyterLab image is launched by JupyterHub this way https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/blob/c74ad1e5c2844aa0e16726c0bdfbabf972122f12/docker/Dockerfile#L105 maybe it could provide some hint. |
@tlvu Can I confirm when you say the JupyterLab and Panel were not installed in the This issue above is relating to a problem whereby JupyterLab and the active kernel than runs panel are in different conda environments, so would be interested if this is working for you. |
I confirm JupyterLab and Panel are both not installed in the |
I've the same environment list tlvu and with the same problem. |
It might be worth investigating how the Voila Jupyter preview handles this or reach out to the Jupyter folks to hear their thoughts on this. |
They can just piggyback on the existing Jupyter kernel infrastructure, i.e. grab the desired kernel from the notebook metadata and ask Jupyter to run the notebook in that kernel. I suppose we could try to do the same although I've never tried running a whole Panel application in a kernel. |
I don't even know what a kernel really is :-) And why its called a kernel. |
Hi there, thanks very much for the software, very much enjoying using it.
Is your feature request related to a problem? Please describe.
In my team we make heavy use of Conda environments, hence although we have a shared JupyterLab image which includes panel, I might be working in a Conda environment with contains a number of custom packages, however when I select "Render with Panel", this uses the base environment of Jupyter, hence fails to load, e.g;
Which works fine when I run the cell gives the following when I select render;
This is frustrating as although I can quite easily run the cells and simulate using it, it's much nicer to render the entire app in a separate panel.
Describe the solution you'd like
It'd be great if the Conda environment active in the current Kernel was used to render the panel app. I do understand that panel itself would need to be installed in the environment as well which does make things a bit confusing.
The text was updated successfully, but these errors were encountered: