-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
extension "jupyterlab-plotly" does not yet support the current version of JupyterLab (v4) #4354
Comments
@bsdz you no longer need to install a Jupyter extension to use Plotly in JupyterLab. The current Plotly documentation indicates you just need to install the Python packages |
I beg to differ. This works in my JupyterLab 3.6.5 set up only if I install the the jupyterlab-plotly extension. The documentation is, unfortunately, wrong here. If I remove the extension from my JupyterLab v3 set up then the plots disappear. They reappear again when I reinstall the extension. As I said I earlier, I keep my Jupyter virtual environments separate to my active kernels and this is perhaps why i need to install the lab extension. |
ah, I'm just going by what the docs say on exactly which version this changes to be simpler. But regardless of whether this works with v3 or not, in your original description of the issue you mentioned you tried with JupyterLab v4, where this should apply. ahh right, I don't know if using a distinct Jupyter venv from your kernel venvs would impact this. @alexcjohnson do you know how well that setup is supported? |
I guess I am facing the same issue. I run Plotly plots dont show up. When examinig the raw
A (non-ideal) workaround is to use the
Hints are welcome and if you need further information to narrow down the root cause feel free to ask... |
I am having the same issue in TLJH ( When creating any plotly fig and running Many thanks to @m-erhardt, because the iframe workaround works to make plotly plots appear for now.
|
I was able to fix this issue by adding JupyterLab venv
Kernel venv 1
Kernel venv 2
|
Thanks for the comment @m-erhardt . |
@Coding-with-Adam exactly. I made no other changes besides of bumping The |
@m-erhardt, out of curiosity, are your JupyterLab and kernel venvs on the same host? are they using the same user id? if so, do you ensure their separation by setting different JUPYTER_RUNTIME_DIR, JUPYTER_DATA_DIR and JUPYTER_CONFIG_DIR environment variables for each? |
As mentioned in my first comment in this issue I use JupyterLab behind JupyterHub and spawn an individual JupyterLab container for each user. So there is complete separation between user-environments. My venvs are not exatly "on the same host" but within the same container/image (which is somewhat comparable). So for every user there is one container with one instance of JupyterLab which is always running with the same configuration and environment variables. In order to run individual notebooks with other Python versions and venvs I registered my other virtual environments as ipykernels. /opt/pyenvs/${kernel_venv_1}/bin/python -m ipykernel install --prefix=/opt/pyenvs/${jupyterlab_env} --name 'venv1' --display-name 'Venv 1'
/opt/pyenvs/${kernel_venv_2}/bin/python -m ipykernel install --prefix=/opt/pyenvs/${jupyterlab_env} --name 'venv2' --display-name 'Venv 2'
[...] This will create kernelspec files at You can then select which kernel to use for each notebook from the JupterLab UI. The reasoning behind this is that I always want to use the latest version of Python and JupyterLab for security reasons and to profit from recent bug fixes. But my particular use-case dictates that I need to provide multiple Python versions with pinned package versions for executing notebooks to guarantee reproducible research results. |
@m-erhardt , that's interesting thanks. I'm not using JupyterHub, but I do serve my kernels inside & outside of docker containers using Enterprise Gateway. I'm sure I tested installing plotly in both the JupyterLab venv as well as my kernel venvs already but I will give it another go. Tbh I've parked my migration to JLab4 because of several other issues where 3rd party extensions are yet to be updated. |
Can you comment on the issue discussed in https://community.plotly.com/t/does-plotly-work-with-jupyterlab-4/76095 ? Specifically, I get these JavaScript errors with plotly 5.18 and jupyterlab 4.0.12 and ipywidgets 8.1.1 and :
|
@lahwaacz I can't give an definitive answer but based on the class-loading error message You can check if the extension is present by running As the These extensions are present within my JupyterLab 4.0.12 container:
|
@m-erhardt The JupyterLab Support section in the README says that |
Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson |
@gvwilson Can you comment on #4354 (comment) and #4354 (comment)? Or is the Plotly team itself not sure if JupyterLab v4 is fully supported? 🤷 |
JupyterLab v3 has reached "end of maintenance" as of 2.5 months ago (May 15, 2024): https://blog.jupyter.org/jupyterlab-3-end-of-maintenance-879778927db2 So ideally plotly (and As of today, the latest plotly version 5.23.0 reports as incompatible:
I see a PR was opened that should hopefully address this #4685, so thanks in advance for the effort to get plotly up to date! |
I'm trying to install the lab extension for JupyterLab v4.0.5 with the command:
The conflicting dependencies match what I see in the master branch for packages/javascript/jupyterlab-plotly/package.json.
I keep my jupyter virtual environment separate to my working kernels. I'm not sure if there's a different way to install plotly for JupyterLab v4.
The text was updated successfully, but these errors were encountered: