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 not detected in jupyterlab #315

Open
AshtonSBradley opened this issue Jul 1, 2019 · 47 comments · Fixed by #332
Open

WebIO not detected in jupyterlab #315

AshtonSBradley opened this issue Jul 1, 2019 · 47 comments · Fixed by #332
Labels

Comments

@AshtonSBradley
Copy link

AshtonSBradley commented Jul 1, 2019

The bug

When using Interact.jl in jupyterlab, specifically @manipulate, one gets the message
"WebIO not detected."
and no output is produced.
Screen Shot 2019-07-01 at 12 19 44 PM

Context

Your context here.

julia> Pkg.status("WebIO")
    Status `~/.julia/environments/v1.1/Project.toml`
  [0f1e0344] WebIO v0.8.5

julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 8

Using jupyterlab. I don't know how to run jupyter labextension list for the containerized jupyterlab installed by IJulia. Possibly I am just missing an extension?

It works fine in the jupyter notebook from IJulia.

@twavv
Copy link
Member

twavv commented Jul 1, 2019

Do you have more than one version of Jupyter Lab (e.g. one on your system and the one installed by IJulia)?

@AshtonSBradley
Copy link
Author

yes and no: I get the same error on my laptop where I only have IJula's version, and on my desktop where I also installed anaconda to see if that would fix it. If I open Jupiterlab from the terminal using anaconda, same result

@twavv
Copy link
Member

twavv commented Jul 1, 2019

Can you Pkg.build("WebIO") and see if that fixes things? If not, copy the output here?

We try to find the best JupyterLab to use; it defaults to the one in your path and if there is none it tries to use the one IJulia installs (if any).

@AshtonSBradley
Copy link
Author

I get identical result to screenshot above, after (including the jupyterlab() Info so you see which one is run)

(v1.1) pkg> build WebIO
  Building MbedTLS  `~/.julia/packages/MbedTLS/X4xar/deps/build.log`
  Building WebIO ── `~/.julia/packages/WebIO/9qsL8/deps/build.log`

julia> using IJulia
[ Info: Recompiling stale cache file /Users/abradley/.julia/compiled/v1.1/IJulia/nfu7T.ji for IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]

julia> jupyterlab()
[ Info: running setenv(`/Users/abradley/.julia/conda/3/bin/jupyter lab`,["XPC_FLAGS=0x0", "VIRTUALENVWRAPPER_PYTHON=/Library/Frameworks/Python.framework/Versions/3.6/bin/python3", "PATH=/Users/abradley/.julia/conda/3/bin:/Applications/OpenSCAD.app/Contents/MacOS/:/Applications/Julia-1.1.app/Contents/Resources/julia/bin/:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/usr/local/texlive/2016/bin/x86_64-darwin:/Users/abradley/Library/Python/3.6/bin:", "PWD=/Users/abradley", "VIRTUALENVWRAPPER_PROJECT_FILENAME=.project", "XPC_SERVICE_NAME=0", "TERM_PROGRAM=Apple_Terminal", "DISPLAY=/private/tmp/com.apple.launchd.kqoUxZCAzq/org.macosforge.xquartz:0", "SHELL=/bin/bash", "VIRTUALENVWRAPPER_SCRIPT=/Users/abradley/Library/Python/3.6/bin/virtualenvwrapper.sh", "__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0", "TMPDIR=/var/folders/3l/7hpnhzns3qgbwvmqzm23bqtc0000gn/T/", "BROWSER=open", "LANG=en_NZ.UTF-8", "SHLVL=0", "LOGNAME=abradley", "TERM_SESSION_ID=C95D59EA-0EB4-4571-BC47-5BE52908AD53", "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.HJBe7By2Bw/Listeners", "VIRTUALENVWRAPPER_WORKON_CD=1", "Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.3WjyJ6GDeZ/Render", "USER=abradley", "VIRTUALENVWRAPPER_HOOK_DIR=/Users/abradley/.virtualenvs", "PROJECT_HOME=/Users/abradley/sites", "TERM=xterm-256color", "HOME=/Users/abradley", "TERM_PROGRAM_VERSION=404.1", "JULIA_NUM_THREADS=8", "WORKON_HOME=/Users/abradley/.virtualenvs", "OPENBLAS_MAIN_FREE=1"])
(v1.1) pkg> status WebIO
    Status `~/.julia/environments/v1.1/Project.toml`
  [0f1e0344] WebIO v0.8.6

(v1.1) pkg> status IJulia
    Status `~/.julia/environments/v1.1/Project.toml`
  [7073ff75] IJulia v1.18.1

julia> versioninfo()
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 8

@twavv
Copy link
Member

twavv commented Jul 1, 2019

I think there is an issue with the JS packages rn (the build fails on Travis). I'll (try to) look into this tonight.

@AnselmJeong
Copy link

Same error here..

Due to undetected WebIO, it is not possible to use PlotlyJS.jl

image

I've added Pkg.add("IJulia"), Pkg.add("WebIO")
I've also installed jupyter labextension by issuing the following command in Julia REPL

using WebIO, IJulia
WebIO.install_jupyter_labextension()

In the command prompt, the output of jupyter labextension list is as follows:

JupyterLab v0.35.4
Known labextensions:
   app dir: c:\Users\anselm\Anaconda3\share\jupyter\lab
        @webio/jupyter-lab-provider v0.8.3 enabled  ok*

   local extensions:
        @webio/jupyter-lab-provider: C:\Users\anselm\.julia\packages\WebIO\9qsL8\packages\jupyter-lab-provider

   linked packages:
        @webio/webio: C:\Users\anselm\.julia\packages\WebIO\9qsL8\packages\webio
 julia> versioninfo()
 Julia Version 1.1.1
 Commit 55e36cc308 (2019-05-16 04:10 UTC)
 Platform Info:
   OS: Windows (x86_64-w64-mingw32)
   CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
   WORD_SIZE: 64
   LIBM: libopenlibm
   LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
 
   [7073ff75] IJulia v1.18.1
   [c601a237] Interact v0.10.2
   [47be7bcc] ORCA v0.2.1
   [f0f68f2c] PlotlyJS v0.12.5
   [91a5bcdd] Plots v0.25.3
   [0f1e0344] WebIO v0.8.6

I hope someone give me a hint...

@AnselmJeong
Copy link

Curiously, the above report by @AshtonSBradley did not raise any issue here...

image

@AshtonSBradley
Copy link
Author

When I try to install the labextension I get

julia> using WebIO, IJulia

julia> WebIO.install_jupyter_labextension()
ERROR: IOError: could not spawn `/usr/local/bin/jupyter labextension link --no-build /Users/abradley/.julia/packages/WebIO/9qsL8/packages/webio`: no such file or directory (ENOENT)
Stacktrace:
 [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at ./process.jl:400
 [2] #505 at ./process.jl:413 [inlined]
 [3] setup_stdios(::getfield(Base, Symbol("##505#506")){Cmd}, ::Array{Any,1}) at ./process.jl:497
 [4] _spawn at ./process.jl:412 [inlined]
 [5] #run#515(::Bool, ::Function, ::Cmd) at ./process.jl:725
 [6] run at ./process.jl:724 [inlined]
 [7] install_jupyter_labextension(::Cmd) at /Users/abradley/.julia/packages/WebIO/9qsL8/deps/jupyter.jl:132
 [8] install_jupyter_labextension() at /Users/abradley/.julia/packages/WebIO/9qsL8/deps/jupyter.jl:131
 [9] top-level scope at none:0

@AshtonSBradley
Copy link
Author

@travigd Seems like WebIO is looking for a user install, but jupyter in IJulia uses a local install by default, which is what I am using on my system. How do I tell WebIO to use the containerised jupyter? Or should I be using a user install instead?

@twavv
Copy link
Member

twavv commented Jul 8, 2019

I'm working on some things to try to fix it right now (see #319).

For now, this should work: ~/.julia/conda/3/bin/jupyter-labextension inst all @webio/jupyter-lab-provider (assuming Mac/Linux).

@AshtonSBradley
Copy link
Author

works Julia 1.1! (not 1.0)

@twavv
Copy link
Member

twavv commented Jul 26, 2019

Should be closed by #319.

@twavv twavv closed this as completed Jul 26, 2019
@fm444fm
Copy link

fm444fm commented Jul 26, 2019

I fought with this issue for quite some time. Finally solved it with:
julia> using WebIO
julia> WebIO.install_jupyter_labextension()
julia> WebIO.install_jupyter_nbextension()
(I have jupyter installed via anaconda outside julia but julia 1.1.1 correctly finds its path)

@twavv
Copy link
Member

twavv commented Jul 26, 2019

Glad it worked! WebIO defaults to the first Jupyter in the path (though you can change this by passing in the path to the executable as the first argument) and if it can't find any, it uses the one installed by Conda.jl (as part of IJulia, usually). We're working on documentation to make things as easy as possible too.

@AshtonSBradley
Copy link
Author

Ok. Fresh install on MacOS Mojave, with ]add WebIO#master WebIO.install_jupyter_labextension(), WebIO.install_jupyter_nbextension(), rebuild IJuliaand letting it install its own conda. I get WebIO not detected.

@twavv
Copy link
Member

twavv commented Jul 28, 2019

How do you launch Jupyter? What does which jupyter output?

@AshtonSBradley
Copy link
Author

AshtonSBradley commented Jul 28, 2019

using IJulia; @async jupyterlab(). which jupyter returns nothing. If I open a standard notebook, i. e. using IJulia; notebook() then I get a slider that doesn't update:
Screen Shot 2019-07-29 at 11 45 42 AM

@twavv
Copy link
Member

twavv commented Jul 29, 2019

That error message also needs to be updated because it's not done automagically anymore.

Can you include the output of

run(`$(WebIO.find_jupyter_cmd()) labextension list`)
run(`$(WebIO.find_jupyter_cmd()) nbextension list`)

as well as the output from the install_jupyter_{lab,nb}extension methods?

@twavv twavv reopened this Jul 29, 2019
@AshtonSBradley
Copy link
Author

julia> using WebIO

julia> run(`$(WebIO.find_jupyter_cmd()) labextension list`)
JupyterLab v1.0.2
Known labextensions:
   app dir: /Users/abradley/.julia/conda/3/share/jupyter/lab
        @webio/jupyter-lab-provider v0.8.8  enabled  OK
Process(`/Users/abradley/.julia/conda/3/bin/jupyter labextension list`, ProcessExited(0))

julia> run(`$(WebIO.find_jupyter_cmd()) nbextension list`)
Known nbextensions:
  config dir: /Users/abradley/.jupyter/nbconfig
    notebook section
      webio-jupyter-notebook  enabled 
      - Validating: OK
Process(`/Users/abradley/.julia/conda/3/bin/jupyter nbextension list`, ProcessExited(0))

julia> WebIO.install_jupyter_labextension()
[ Info: Using default Jupyter executable at `/Users/abradley/.julia/conda/3/bin/jupyter`; to use a different executable, see the documentation by running `?WebIO.install_jupyter_labextension`.
[LabBuildApp] JupyterLab 1.0.2
[LabBuildApp] Building in /Users/abradley/.julia/conda/3/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets
Process(`/Users/abradley/.julia/conda/3/bin/jupyter lab build`, ProcessExited(0))

julia> WebIO.install_jupyter_nbextension()
[ Info: Installing Jupyter WebIO extension...
Up to date: /Users/abradley/Library/Jupyter/nbextensions/webio-jupyter-notebook.js

    To initialize this nbextension in the browser every time the notebook (or other app) loads:
    
          jupyter nbextension enable <the entry point> --user
    
Enabling notebook extension webio-jupyter-notebook...
      - Validating: OK
Process(`/Users/abradley/.julia/conda/3/bin/jupyter nbextension enable --user webio-jupyter-notebook`, ProcessExited(0))

@twavv
Copy link
Member

twavv commented Jul 29, 2019

Have you refreshed the window and/or restarted Jupyter? Does the toy example that you opened this issue with work?

How about dom"p"("hello")?

@AshtonSBradley
Copy link
Author

restarting jupyterlab gives
Screen Shot 2019-07-29 at 1 05 08 PM

@vilim
Copy link

vilim commented Jul 30, 2019

I have this issue in JupyterLab 1.0

It is possible to install the jupyter lab provider extension, however WebIO claims afterwards:
WebIO not detected when trying e.g. node(:div, "Hello World")

I tried uninstalling everything, running jupyter lab clean, and running WebIO.install_jupyter_serverextension and WebIO.install_jupyter_labextension and verifying the jupyter location is correct. There are no errors in the JavaScript browser console, and jupyter labextension list shows the extension as installed on the correct version (0.8.8)

@twavv
Copy link
Member

twavv commented Jul 30, 2019

I can reproduce this. This is likely related to changes in the latest version of WebIO. Will debug.

@AshtonSBradley
Copy link
Author

AshtonSBradley commented Aug 2, 2019

I'm getting an error on master when trying WebIO.install_jupyterlabextension()

julia> WebIO.install_jupyter_labextension()
[ Info: Using default Jupyter executable at `/Users/abradley/.julia/conda/3/bin/jupyter`; to use a different executable, see the documentation by running `?WebIO.install_jupyter_labextension`.
[LabBuildApp] JupyterLab 1.0.2
[LabBuildApp] Building in /Users/abradley/.julia/conda/3/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets
An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details:  /var/folders/qy/yrp8ty0d77sd4ghs1sxdwt0w0000gp/T/jupyterlab-debug-mjiqnuvm.log
ERROR: failed process: Process(`/Users/abradley/.julia/conda/3/bin/jupyter lab build`, ProcessExited(1)) [1]
Stacktrace:
 [1] pipeline_error at ./process.jl:785 [inlined]
 [2] #run#515(::Bool, ::Function, ::Cmd) at ./process.jl:726
 [3] run at ./process.jl:724 [inlined]
 [4] #install_jupyter_labextension#65(::Bool, ::Bool, ::Function, ::Nothing) at /Users/abradley/.julia/packages/WebIO/r6A67/deps/jupyter.jl:154
 [5] install_jupyter_labextension at /Users/abradley/.julia/packages/WebIO/r6A67/deps/jupyter.jl:137 [inlined] (repeats 2 times)
 [6] top-level scope at none:0

The log file is

[LabBuildApp] Building in /Users/abradley/.julia/conda/3/share/jupyter/lab
[LabBuildApp] Node v12.6.0

[LabBuildApp] Building jupyterlab assets
[LabBuildApp] > node /Users/abradley/.julia/conda/3/lib/python3.7/site-packages/jupyterlab/staging/yarn.js install --non-interactive
[LabBuildApp] yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.36s.

[LabBuildApp] > node /Users/abradley/.julia/conda/3/lib/python3.7/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer --fail
[LabBuildApp] yarn run v1.15.2
error Command "yarn-deduplicate" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

[LabBuildApp] > node /Users/abradley/.julia/conda/3/lib/python3.7/site-packages/jupyterlab/staging/yarn.js
[LabBuildApp] yarn install v1.15.2
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 0.35s.

[LabBuildApp] > node /Users/abradley/.julia/conda/3/lib/python3.7/site-packages/jupyterlab/staging/yarn.js run build
[LabBuildApp] yarn run v1.15.2
$ webpack
/bin/sh: webpack: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

[LabBuildApp] JupyterLab failed to build
[LabBuildApp] Traceback (most recent call last):

[LabBuildApp]   File "/Users/abradley/.julia/conda/3/lib/python3.7/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

[LabBuildApp]   File "/Users/abradley/.julia/conda/3/lib/python3.7/site-packages/jupyterlab/labapp.py", line 80, in start
    command=command, logger=self.log)

[LabBuildApp]   File "/Users/abradley/.julia/conda/3/lib/python3.7/site-packages/jupyterlab/commands.py", line 373, in build
    command=command, clean_staging=clean_staging)

[LabBuildApp]   File "/Users/abradley/.julia/conda/3/lib/python3.7/site-packages/jupyterlab/commands.py", line 566, in build
    raise RuntimeError(msg)

[LabBuildApp] RuntimeError: JupyterLab failed to build

[LabBuildApp] Exiting application: JupyterLab

@twavv
Copy link
Member

twavv commented Aug 2, 2019

What a terribly unhelpful log message:

[LabBuildApp] RuntimeError: JupyterLab failed to build

Can you make sure you run

export PATH="/Users/abradley/.julia/conda/3/bin:$PATH"
jupyter labextension unlink @webio/webio
jupyter labextension uninstall @webio/jupyter-lab-provider

(the unlink might error if @webio/webio is not installed but it's fine if it does) and the retry installing?

@twavv twavv reopened this Aug 2, 2019
@AshtonSBradley
Copy link
Author

Same result (also rebuild WebIO, Julia, Interact just to be sure)
Screen Shot 2019-08-02 at 3 53 40 PM
Screen Shot 2019-08-02 at 3 54 13 PM
Screen Shot 2019-08-02 at 3 53 16 PM

@AshtonSBradley
Copy link
Author

julia> versioninfo()
Julia Version 1.1.1
Commit 55e36cc (2019-05-16 04:10 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin15.6.0)
  CPU: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)

@twavv
Copy link
Member

twavv commented Aug 6, 2019

Unfortunately I can't reproduce this. I suspect you might be infected by the previous "bad" (i.e. not-working/buggy) WebIO jupyterlab extension.

Can you try nuking conda and see if that fixes things?

run(`rm -rf ~/.julia/dev/conda`)
using Pkg
Pkg.build("Conda")
using IJulia, WebIO
WebIO.install_jupyter_labextension()
jupyterlab()

@AshtonSBradley
Copy link
Author

ok, I have highly system dependent results for this one:

MacOS Mojave 10.14.6
It ran without error, and no longer complains about WebIO not detected. However, while manipulate worked the first time, on subsequent calls (fresh reload of jupyterlab), the sliders don't update

MacOS High Sierra 10.13.6
This one hits an error
Screen Shot 2019-08-06 at 1 29 37 PM

MacOS Mojave 10.14.5
hits a similar error at a different point
Screen Shot 2019-08-06 at 1 33 03 PM

@twavv
Copy link
Member

twavv commented Aug 6, 2019

The first one is (probably) because you have Jupyter notebook installed through pip or homebrew. You can specify force_conda_jupyter to make WebIO use the one installed by IJulia (assuming that's how you launch jupyterlab).

The second one will require you to upgrade jupyterlab. You should be able to Conda.add("jupyterlab") I believe.

There seem to be some issues with jupyterlab ATM concerning the initial render. Usually refreshing makes things work.

@AshtonSBradley
Copy link
Author

AshtonSBradley commented Aug 6, 2019

In the first one, this is just a standard install on a new machine, following the IJulia install, so I don't think that is it. If I try to force it, how and to what do I supply the force_conda_jupyter option?

The second one initially seemed fixed by your suggestion, but then on restart, sliders no longer update, as for the first one.

@twavv
Copy link
Member

twavv commented Aug 6, 2019

WebIO uses the first jupyter executable on your system, which, in the first case, is /usr/local/bin/jupyter. So there seems to be some Jupyter installation there. To force using the conda installation:

WebIO.install_jupyter_labextension(; force_conda_jupyter=true)

I don't have a fix for the second other than just "refresh until it works." Hopefully I'll have some time to look into that soon.

@AshtonSBradley
Copy link
Author

AshtonSBradley commented Aug 6, 2019

Checking the third one (all I have access to atm) using this gives a slightly different error

shell> rm -rf ~/.julia/dev/conda

(v1.1) pkg> build Conda
  Building Conda  `~/.julia/packages/Conda/kLXeC/deps/build.log`

julia> using IJulia, WebIO

julia> WebIO.install_jupyter_labextension(;force_conda_jupyter=true)
[ Info: Using default Jupyter executable at `/Users/abradley/.julia/conda/3/bin/jupyter`; to use a different executable, see the documentation by running `?WebIO.install_jupyter_labextension`.

Errored, use --debug for full output:
ValueError: No linked package for @webio/webio
Node v12.5.0

No labextension named "@webio/jupyter-lab-provider" installed
Node v12.5.0

> /usr/local/bin/npm pack @webio/jupyter-lab-provider@0.8.9
npm notice 
npm notice 📦  @webio/jupyter-lab-provider@0.8.9
npm notice === Tarball Contents === 
npm notice 16.6kB dist/labextension.js
npm notice 957B   package.json        
npm notice 438B   README.md           
npm notice === Tarball Details === 
npm notice name:          @webio/jupyter-lab-provider             
npm notice version:       0.8.9                                   
npm notice filename:      webio-jupyter-lab-provider-0.8.9.tgz    
npm notice package size:  5.3 kB                                  
npm notice unpacked size: 18.0 kB                                 
npm notice shasum:        6515884136f4969862ea1184ad5f32aee4413178
npm notice integrity:     sha512-x3N+WghI7hSGR[...]0pQeyr/awc6MA==
npm notice total files:   3                                       
npm notice 
webio-jupyter-lab-provider-0.8.9.tgz

Errored, use --debug for full output:
ValueError: 
"@webio/[email protected]" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension        Package
>=0.19.1 <0.20.0        >=1.0.1 <2.0.0   @jupyterlab/application
>=0.19.1 <0.20.0        >=1.0.1 <2.0.0   @jupyterlab/docmanager
>=0.19.2 <0.20.0        >=1.0.1 <2.0.0   @jupyterlab/notebook
>=0.19.1 <0.20.0        >=1.0.1 <2.0.0   @jupyterlab/rendermime
>=3.2.1 <4.0.0          >=4.0.1 <5.0.0   @jupyterlab/services
ERROR: failed process: Process(`/Users/abradley/.julia/conda/3/bin/jupyter labextension install --no-build @webio/[email protected]`, ProcessExited(1)) [1]
Stacktrace:
 [1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
 [2] pipeline_error at ./process.jl:785 [inlined]
 [3] #run#515(::Bool, ::Function, ::Cmd) at ./process.jl:726
 [4] run at ./process.jl:724 [inlined]
 [5] #install_jupyter_labextension#66(::Bool, ::Bool, ::Function, ::Nothing) at /Users/abradley/.julia/packages/WebIO/n3Ii6/deps/jupyter.jl:159
 [6] #install_jupyter_labextension at ./none:0 [inlined] (repeats 2 times)
 [7] top-level scope at none:0

@AshtonSBradley
Copy link
Author

AshtonSBradley commented Aug 6, 2019

On the third one (macOS Mojave 10.14.6) I no longer get a major error after nuking Conda, but I get this

julia> WebIO.install_jupyter_labextension(;force_conda_jupyter=true)
[ Info: Using default Jupyter executable at `/Users/abradley/.julia/conda/3/bin/jupyter`; to use a different executable, see the documentation by running `?WebIO.install_jupyter_labextension`.
An error occured.
ValueError: No linked package for @webio/webio
See the log file for details:  /var/folders/qy/yrp8ty0d77sd4ghs1sxdwt0w0000gp/T/jupyterlab-debug-4u7r_m1b.log
Uninstalling @webio/jupyter-lab-provider from /Users/abradley/.julia/conda/3/share/jupyter/lab/extensions
[LabBuildApp] JupyterLab 1.0.2
[LabBuildApp] Building in /Users/abradley/.julia/conda/3/share/jupyter/lab
[LabBuildApp] Building jupyterlab assets
Process(`/Users/abradley/.julia/conda/3/bin/jupyter lab build`, ProcessExited(0))

Then the sliders come appear (WebIO not detected is no longer the issue), but again, they don't update when slid ...

Should I open a new issue?

@jzazo
Copy link

jzazo commented Oct 4, 2019

I have the same problem shown in the message above on Ubuntu 18.04.
I have nuked Conda.jl and reinstalled, but I keep getting the same message.
I do have nodejs and npm installed:

$ nodejs -v
v8.10.0
$ npm -v
3.5.2

Anyway to fix this problem? Thank you.

@AshtonSBradley
Copy link
Author

@jzazo did you ever get this working?

@jzazo
Copy link

jzazo commented Nov 30, 2019

Well, I was using ECharts.jl to plot some figures and I could not get it to work on Jupyter nor Atom. However it did work using Blink.jl on terminal, and that sufficed to me. Sorry I cannot help, it didn't work for me.

@fergu
Copy link

fergu commented Jan 4, 2020

I seem to have made some progress on this, though I'm running Jupyter Lab in a docker container on Debian.

For me, the reason none of this was working (Specifically that WebIO couldn't be found) was because I was mounting/using a custom Jupyter config file. It turns out, during the container build, WebIO correctly finds and installs itself, but it also adds a few lines on to the end of ~/.jupyter/jupyter_notebook_config.py which state where to find WebIO and its components. By using a custom, runtime-added config file this was being overwritten and so WebIO couldn't be found because my host config file didn't contain the bits needed.

What I've had to do is edit the Dockerfile to copy my config files over during build time, before WebIO is installed. This may not be ideal from a "how docker is meant to be used" viewpoint, but it does work.

As a note, I do still get the ValueError: No linked package for @webio/webio message during build, but the widgets do still work.

@fergu
Copy link

fergu commented Jan 4, 2020

I should also add the output of jupyter labextension list

jovyan@0744d1c35e75:~$ which jupyter
/opt/conda/bin/jupyter
jovyan@0744d1c35e75:~$ jupyter labextension list
JupyterLab v1.2.1
Known labextensions:
   app dir: /opt/conda/share/jupyter/lab
        @webio/jupyter-lab-provider v0.8.13  enabled  OK

@shashi
Copy link
Member

shashi commented Jan 8, 2020

This may not be ideal from a "how docker is meant to be used" viewpoint

Haha what's that?

Yeah this situation sounds a bit out of our control. Although running the install command after your Dockerfile is done setting up (like at the very end) should work too.

@fergu
Copy link

fergu commented Jan 8, 2020

My thought in posting was less about Docker (because obviously that's not WebIO's problem :P) but more sharing what I found was the hang up. Maybe some of the people for whom this isn't working aren't having the right lines added to their Jupyter Config or perhaps they're overwriting the one created by the WebIO installation procedure without realizing it?

@R3DKR0SS
Copy link

Hello, I'd like to share with everyone the solution that helped me get out of this problem of not being able to use Interact because of the said error: WebIO not detected in jupyterlab

After All my troubleshooting, removing and reinstalling Julia, IJulia, Interact and etc, what helped me was as simple as running from "Anaconda PowerShell Prompt (3)" the next code:

pip install --user jupyterlab

NOTE: It doesn't matters if you have it already installed from IJulia, I saw no conflict at the time of using this command.
After that, Jupyter started working as expected.
And, btw, I saw some people complaining about the NodeJS package, and I'd like to add that everyone's able to download It using Pkg, just the same way almost everyone of us got IJulia.

This worked on my case, but I'm not 100% sure that it'll do the same in every case.

@Ooooscar
Copy link

May I ask if anyone has found a stable solution to this?

I'm on macOS 11.0.1. Interact does not work on Jupyter notebook: (this screenshot is taken from Visual Studio Code)

Screen Shot 2022-02-19 at 19 07 09

But it seems to work fine in command line:

Screen Shot 2022-02-19 at 19 03 39

@brunocastroibarburu94
Copy link

Can confirm, both Interact.jl and PlotlyJS.jl have the same problem in Windows and Linux. I have been trying for 2 days to sort it :/

It would be nice if documentation could be expanded a little and to include a simple test to debug what may be going on with WebIO and Juypyterlab detecting it.

@AshtonSBradley
Copy link
Author

I know of no solution. I found this so disheartening when dealing with large student groups that I gave up on jupyterlab and moved to Pluto several years ago. For me this proven a highly robust solution to the problem.

@ctbaum
Copy link

ctbaum commented Dec 4, 2023

I don't know if this helps debugging this issue but on brand new systemwide installation of jupyterlab via python3 -m pip install webio_jupyter_extension and python3 -m jupyterlab as recommended on IJulia docs, the following traceback is thrown when running jupyter lab

The module 'jupyter_nbextensions_configurator' could not be found (No module named 'jupyter_nbextensions_configurator'). Are you sure the extension is installed?
    Traceback (most recent call last):
      File "/Users/ctl/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jupyter_server/extension/manager.py", line 322, in add_extension
        extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
      File "/Users/ctl/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jupyter_server/extension/manager.py", line 186, in __init__
        self._load_metadata()
      File "/Users/ctl/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jupyter_server/extension/manager.py", line 201, in _load_metadata
        raise ExtensionModuleNotFound(msg) from None
    jupyter_server.extension.utils.ExtensionModuleNotFound: The module 'jupyter_nbextensions_configurator' could not be found (No module named 'jupyter_nbextensions_configurator'). Are you sure the extension is installed?
[W 2023-12-04 22:59:20.748 ServerApp] webio_jupyter_extension.serverextension | error adding extension (enabled: True): The module 'webio_jupyter_extension.serverextension' could not be found (No module named 'notebook'). Are you sure the extension is installed?
    Traceback (most recent call last):
      File "/Users/ctl/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jupyter_server/extension/manager.py", line 322, in add_extension
        extpkg = ExtensionPackage(name=extension_name, enabled=enabled)
      File "/Users/ctl/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jupyter_server/extension/manager.py", line 186, in __init__
        self._load_metadata()
      File "/Users/ctl/.pyenv/versions/3.10.9/lib/python3.10/site-packages/jupyter_server/extension/manager.py", line 201, in _load_metadata
        raise ExtensionModuleNotFound(msg) from None
    jupyter_server.extension.utils.ExtensionModuleNotFound: The module 'webio_jupyter_extension.serverextension' could not be found (No module named 'notebook'). Are you sure the extension is installed?
[I 2023-12-04 22:59:20.748 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-12-04 22:59:20.774 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-12-04 22:59:20.775 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-12-04 22:59:20.776 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-12-04 22:59:20.778 LabApp] JupyterLab extension loaded from /Users/ctl/.pyenv/versions/3.10.9/lib/py

Also, I don't get WebIO not detected -although I do if jupyter runs within vscode-
image
I simply don't get the widgets.
Also, for completeness, take a look at the following:
image
I cannot find a higher version though.

@zsunberg
Copy link

@ctrebbau did you end up fixing this or finding an alternative? I am at the same place and a fear that I may just have to abandon my old notebooks :(

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

Successfully merging a pull request may close this issue.