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

plotly 3.0.0 installation requirements for use in JupyterLab #1054

Closed
lebedov opened this issue Jul 10, 2018 · 16 comments
Closed

plotly 3.0.0 installation requirements for use in JupyterLab #1054

lebedov opened this issue Jul 10, 2018 · 16 comments

Comments

@lebedov
Copy link

lebedov commented Jul 10, 2018

The plotly 3.0.0 installation requirements indicate that one should install the plotlywidget extension to use the package in JupyterLab. It seems that plotlywidget and plotly-extension don't get along; perhaps this should be noted in the installation instructions?

@jonmmease
Copy link
Contributor

Thanks for the report @lebedov. We do need to try to figure out how to make these extensions get along.

@dhirschfeld
Copy link

Is the plotly-extension even needed anymore?
c.c. @gnestor

@gnestor
Copy link
Contributor

gnestor commented Jul 16, 2018

I have successfully installed both. It's certainly possible that plotlywidget renders plotly-extension obsolete, but I haven't played with plotlywidget enough to be sure.

The Error: Cannot find module 'plotlywidget/package.json' error message suggests that plotlywidget package was not properly downloaded (after doing jupyter labextension install plotlywidget).

@jonmmease @dhirschfeld Have you tried installing the plotlywidget labextension?

@jonmmease
Copy link
Contributor

I haven't tried to install and test both plugins together yet, but I don't think there's any fundamental reason why it should be a problem.

My current understanding is that plotly-extension is not obsolete because it provides the mime-type support needed by plotly.offline.iplot, and the support for opening .plotly.json files as plots.

plotlywidget on the other hand provides only the JupyterWidget corresponding to the new FigureWidget class.

I'll post my notes here when I get a chance to try out installing both.

@dhirschfeld
Copy link

dhirschfeld commented Jul 16, 2018

I have, and I thought they installed fine however I don't have an environment set up to test at the moment

@gnestor
Copy link
Contributor

gnestor commented Jul 17, 2018

@jonmmease is correct in that plotly-extension does enable users to open Plotly files (something that plotlywidget does not do) and it also supports rendering plotly charts using plotly.py < 3.

@dhirschfeld
Copy link

I'm wondering if there is any appetite to subsume the functionality of plotly-extension into plotlywidget itself? Or vice-versa. Just from a user perspective installing 1 extension to get all the functionality is easier than installing 2.

@gnestor
Copy link
Contributor

gnestor commented Jul 17, 2018

This would be @jonmmease's call 👍

FYI, there are other plotly-related jupyerlab extensions in the wild, such as https://github.com/plotly/jupyterlab-chart-editor.

@jonmmease
Copy link
Contributor

I'm not ready to merge them at this point, but it is something to consider down the road. I wonder if there's a way to specify a meta-package that is a collection of JupyterLab extensions to all be installed together.

And I am excited to play with the jupyterlab plotly chart editor!

@dhirschfeld
Copy link

Maybe the new extension manager will assist in helping advertise the existence of extensions - I can imagine (in future) a recommendation feature such as in vscode.

@jonmmease
Copy link
Contributor

@lebedov @dhirschfeld @gnestor
I just released version 3.1.0 of plotly.py and 0.2.0 of plotlywidget. I tested out this configuration with version 0.16 of @jupyterlab/plotly-extension and everything seems to be working together great! I'm guessing that there was some Plotly.js version conflict between plotlywidget and @jupyterlab/plotly-extension before.

I also added the installation instructions for @jupyterlab/plotly-extension to our README. Since there are so many freakin' versions to get right to get everything working in JupyterLab I decided to start putting explicit version numbers on all of the install steps in the README.

Here are the current versions of everything that are working well for me.

pip install plotly==3.1.0
pip install "notebook>=5.3" "ipywidgets>=7.2"
pip install jupyterlab==0.32.1
jupyter labextension install @jupyter-widgets/jupyterlab-manager@0.35 # Jupyter widgets support
jupyter labextension install plotlywidget@0.2  # FigureWidget support
jupyter labextension install @jupyterlab/plotly-extension@0.16  # offline iplot support

From here on out, every time I release a new version of plotly.py or plotlywidget I'll update the versions of jupyterlab, @jupyter-widgets/jupyterlab-manager, and @jupyterlab/plotly-extension in the README to the most recent compatible versions.

@dhirschfeld
Copy link

Curious if this will work with the imminent jupyterlab 0.33? I'm waiting for the jupyterlab release before upgrading my environment but I'm conscious that not all extensions will immediately be compatible with the new version.

@jonmmease
Copy link
Contributor

Yeah, I'm not sure. It might just work if you upgrade jupyterlab to 0.33 and @jupyter-widgets/jupyterlab-manager to 0.36.

Let us know if you give it a try!

@dhirschfeld
Copy link

Let us know if you give it a try!

Will do!

@lebedov
Copy link
Author

lebedov commented Jul 22, 2018

@jonmmease Confirming that the configuration you described works for me too. Thanks!

@jonmmease
Copy link
Contributor

Awesome @lebedov, I think I'll go ahead and close this issue now. Thanks for bringing it up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants