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

WebIO extension is installed, but is not detected #495

Open
GrigorySarnitsky opened this issue Oct 16, 2022 · 4 comments
Open

WebIO extension is installed, but is not detected #495

GrigorySarnitsky opened this issue Oct 16, 2022 · 4 comments

Comments

@GrigorySarnitsky
Copy link

GrigorySarnitsky commented Oct 16, 2022

The bug

I have installed WebIO Jupyter extension through pip, and it seems succesfully:

$ jupyter labextension list
JupyterLab v3.4.7
/usr/local/share/jupyter/labextensions
        webio-jupyterlab-provider v0.1.0 enabled OK (python, webio_jupyter_extension)
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)

Yet, when I run in JupyterLab

using WebIO
WebIO.install_jupyter_labextension()

It gives an error:

The WebIO Jupyter extension must be installed using Python or Conda. See https://juliagizmos.github.io/WebIO.jl/latest/providers/ijulia/ for more information.

Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] _error()
   @ WebIO ~/.julia/packages/WebIO/4JqEH/deps/jupyter.jl:1
 [3] install_jupyter_labextension(; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ WebIO ~/.julia/packages/WebIO/4JqEH/deps/jupyter.jl:9
 [4] install_jupyter_labextension()
   @ WebIO ~/.julia/packages/WebIO/4JqEH/deps/jupyter.jl:9
 [5] top-level scope
   @ In[6]:1
 [6] eval
   @ ./boot.jl:368 [inlined]
 [7] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base ./loading.jl:1428

The real issue for me is that I cannot make interactive 3D plots in Julia plots (plotly or plotlyjs), the result is blank.

At the same time the same notebook run in VSCode is able to render interactive 3D plots albeit with a warning:

The WebIO Jupyter extension was not detected. See the [WebIO Jupyter integration documentation ](https://juliagizmos.github.io/WebIO.jl/latest/providers/ijulia/)for more information.

Context

I have tried JupyterLab both in Chromium and Electron app made with Nativifier. I am on Ubuntu 22.04.

julia> Pkg.status("WebIO")
Status `~/.julia/environments/v1.8/Project.toml`
  [0f1e0344] WebIO v0.8.18
julia> versioninfo()
Julia Version 1.8.1
Commit afb6c60d69a (2022-09-06 15:09 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores
$ jupyter labextension list
JupyterLab v3.4.7
/usr/local/share/jupyter/labextensions
        webio-jupyterlab-provider v0.1.0 enabled OK (python, webio_jupyter_extension)
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
@GrigorySarnitsky
Copy link
Author

I found at least a workaround, that fixed plotly:

sudo jupyter labextension install jupyterlab-plotly

and after that I might also have rebuild WebIO or PlotlyJS

@xgdgsc
Copy link

xgdgsc commented Nov 3, 2022

Still not working for me with jupyterlab 3.5 with old minconda with py 3.7 installation and with a new environment of python3.9 jupyterlab 3.4.4 combination.

@GrigorySarnitsky
Copy link
Author

GrigorySarnitsky commented Sep 2, 2023

I tried today this once again and it did not work initially on a clean installation even with installed jupyterlab-plotly extension. I don't know what made the trick, but I also ran the notebook with plotly as a Jupyter notebook in VSCode (there it worked, but not in the JupyterLab nativifier app). Then I opened the file in a JupyterLab in my main browser and it did work there and after that in the Nativifier app. At some point I also installed plotly in python (via pip). So if it does not work initially for you try different browsers/VSCode, somehow now it works for me.

@jlumpe
Copy link
Contributor

jlumpe commented Apr 18, 2024

In jupyterlab v3 the labextension install command is deprecated and the recommended way to install extensions is as part of a regular Python package (through pip or conda). It is not explained clearly in Plotly's documentation but installing the plotly Python package in the same environment as jupyterlab will also install the jupyterlab-plotly extension properly. This was the only way I was able to get it working after a lot of struggling with it.

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

3 participants