JuliaGizmos / WebIO.jl

A bridge between Julia and the Web.
https://juliagizmos.github.io/WebIO.jl/latest/
Other
228 stars 64 forks source link

WebIO cannot install jupyter extension #487

Closed JBlaschke closed 2 years ago

JBlaschke commented 2 years ago

The bug

I am trying to install the Jupyter Lab WebIO.jl extension:

using WebIO
WebIO.install_jupyter_labextension()

But I get the 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:33
 [2] _error()
   @ WebIO ~/.julia/packages/WebIO/VF9p5/deps/jupyter.jl:1
 [3] install_jupyter_labextension(; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ WebIO ~/.julia/packages/WebIO/VF9p5/deps/jupyter.jl:9
 [4] install_jupyter_labextension()
   @ WebIO ~/.julia/packages/WebIO/VF9p5/deps/jupyter.jl:9
 [5] top-level scope
   @ In[1]:2
 [6] eval
   @ ./boot.jl:373 [inlined]
 [7] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base ./loading.jl:1196

The python3 -m pip install --upgrade webio_jupyter_extension command worked fine (and I restarted Jupyter before trying again):

$ jupyter nbextension list
Known nbextensions:
  config dir: /Users/blaschke/local/virtualenv/py3/etc/jupyter/nbconfig
    notebook section
      nbdime/index  enabled
      - Validating: OK
      webio-jupyter-nbextension/nbextension  enabled
      - Validating: OK
      jupyter-js-widgets/extension  enabled
      - Validating: OK
    tree section
      ipyparallel/main  enabled
      - Validating: OK
$ jupyter labextension list 
JupyterLab v3.2.9
/Users/blaschke/local/virtualenv/py3/share/jupyter/labextensions
        nbdime-jupyterlab v2.1.1 enabled OK
        webio-jupyterlab-provider v0.1.0 enabled OK (python, webio_jupyter_extension)
        ipyparallel-labextension v8.2.0 enabled OK (python, ipyparallel)
        @jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /Users/blaschke/local/virtualenv/py3/share/jupyter/lab
$ jupyter serverextension list
config dir: /Users/blaschke/local/virtualenv/py3/etc/jupyter
    ipyparallel  enabled
    - Validating...
      ipyparallel 8.2.0 OK
    jupyterlab  enabled
    - Validating...
      jupyterlab 3.2.9 OK
    nbdime  enabled
    - Validating...
      nbdime 3.1.1 OK
    webio_jupyter_extension.serverextension  enabled
    - Validating...
      webio_jupyter_extension.serverextension  OK

This seems to be related to: #475 and #469 -- but thought I would give more info here.

Context

Status `~/.julia/environments/v1.7/Project.toml`
[0f1e0344] WebIO v0.8.17
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.5.0)
  CPU: Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
twavv commented 2 years ago

The pip install is all you need to do to install WebIO.

JBlaschke commented 2 years ago

Can you advise on why WebIO is not working (i.e. the content is not being updated when I change an interactive WebIO element)

JBlaschke commented 2 years ago

@travigd I did the pip install, but when I run:

using WebIO
WebIO.install_jupyter_labextension()

I still get the 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.
ChiHaoLu commented 1 year ago

The pip install is all you need to do to install WebIO.

If you want to answer this problem, give a clear instruction. Do not give a meaningless words and close the issue.