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! Windows 10, Julia 1.1.1 #342

Open
leiniu-math opened this issue Aug 25, 2019 · 4 comments
Open

WebIO not detected! Windows 10, Julia 1.1.1 #342

leiniu-math opened this issue Aug 25, 2019 · 4 comments

Comments

@leiniu-math
Copy link

The bug

In the Jupyterlab, I use PlotlyJS to plot figure.

Input [1]: using PlotlyJS
Input [2]: plot(rand(5,5))

Output [2]:WebIO not detected.

Context

In the Julia,

julia> WebIO.install_jupyter_labextension()
[ Info: Using default Jupyter executable at 'C:\ProgramData\Anaconda3\Scripts\jupyter.exe'; 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: C:\Users\Niulei\AppData\Local\Temp\jupyterlab-debug-lfp5i3bk.log
Uninstalling @webio/jupyter-lab-provider from c:\programdata\anaconda3\share\jupyter\lab\extensions
[LabBuildApp] JupyterLab 1.0.0
[LabBuildApp] Building in c:\programdata\anaconda3\share\jupyter\lab
[LabBuildApp] Building jupyterlab assets
Process('C:\ProgramData\Anaconda3\Scripts\jupyter.exe' lab build, ProcessExited(0))

julia> jupyter labextension list
ERROR: syntax: extra token "labextension" after end of expression

help?> WebIO.install_jupyter_labextension()
install_jupyter_labextension([jupyter]; force_conda_jupyter=false)

Install the Jupyter Lab extension for WebIO using the specified jupyter executable. The executable defaults to the
first one found in the PATH or Jupyter installed via IJulia/Conda.jl. To force using Conda.jl's jupyter, specify the
force_conda_jupyter=true keyword; this might be necessary if you launch Jupyter via IJulia in the Julia REPL.

The IJulia provider documentation (https://juliagizmos.github.io/WebIO.jl/latest/providers/ijulia/) provides some
more information (and caveats) about the relationship between Jupyter Lab and WebIO.

julia> Pkg.installed()
Dict{String,Union{Nothing, VersionNumber}} with 19 entries:
"DynamicalSystems" => v"1.3.0"
"Interact" => v"0.10.3"
"Measurements" => v"2.1.0"
"Conda" => v"1.3.0"
"Plotly" => v"0.2.0"
"PyCall" => v"1.91.2"
"VideoIO" => v"0.6.9"
"Makie" => v"0.9.4"
"IJulia" => v"1.19.0"
"Blink" => v"0.12.0"
"Plots" => v"0.26.0"
"DiffEqTutorials" => v"0.1.0"
"WebIO" => v"0.8.9"
"MATLAB" => v"0.7.3"
"InteractiveChaos" => v"0.3.2"
"DifferentialEquations" => v"6.6.0"
"SpecialFunctions" => v"0.7.2"
"PlotlyJS" => v"0.12.5"
"ORCA" => v"0.2.1"

In the cmd,
C:\WINDOWS\system32>jupyter labextension list
JupyterLab v1.0.0
Known labextensions:
app dir: c:\programdata\anaconda3\share\jupyter\lab
@jupyter-widgets/jupyterlab-manager v1.0.2 enabled ok
@jupyterlab/plotly-extension v1.0.0 enabled ok
@webio/jupyter-lab-provider v0.8.9 enabled ok
ipyevents v1.6.3 enabled ok
jupyterlab-chart-editor v1.2.0 enabled ok
jupyterlab-plotly v1.0.0 enabled ok
plotlywidget v1.0.0 enabled ok

C:\WINDOWS\system32>jupyter --path
config:
C:\Users\Niulei.jupyter
C:\ProgramData\Anaconda3\etc\jupyter
C:\ProgramData\jupyter
data:
C:\Users\Niulei\AppData\Roaming\jupyter
C:\ProgramData\Anaconda3\share\jupyter
C:\ProgramData\jupyter
runtime:
C:\Users\Niulei\AppData\Roaming\jupyter\runtime

@KateKucera
Copy link

Did you ever get this resolved? I have the same issue on a mac.

@kobussch
Copy link
Contributor

kobussch commented Sep 29, 2019

Same here on Windows 10 Home and Windows 7 on upgrading to Julia 1.2. Did a fresh installs of Anaconda and Julia on the Windows 7 machine by completely wiping all Anaconda, Jupyter and Julia folders I could find, including the %user%/.julia folder. I noticed two things that may be relevant. First observation is that after building IJulia, Conda and WebIO, the .julia/Conda/3 folder was completely empty, which means that a call to find_jupyter_cmd() comes up empty handed. It seems like you have to run IJulia.notebook() from within the Julia REPL for the miniConda app to be installed. This is counter-intuitive and should be mentioned more prominently in the documentation. The workflow for many people would be to launch Julia from Jupyter, not the other way around. The second observation is that jupyter.jl (part of IJulia) seems to think that jupyter.exe is in .julia/conda/3/bin but I find it in .julia/conda/3/Scripts. Is this not maybe why WebIO does its disappearing trick? I haven't tried modifying this yet.

@kobussch
Copy link
Contributor

Follow-up on my previous post: manually adding %USERPROFILE%.julia\conda\3\Scripts in my path solved the problem on my Windows 10 installation, but not on Windows 7. On the Windows 7 PC the find_jupyter_cmd() works, but install_jupyter_labextension() fails with an exception: Jupyter command jupyter-labextension not found.

@kobussch
Copy link
Contributor

kobussch commented Oct 1, 2019

Solved my problem at last. There are two problems to correct. One in WebIO (actually in jupyter) and one in IJulia. As mentioned in my previous post, a partial workaround is to set a path to jupyter.exe in the environmental settings. This is caused by IJulia.jl that prepends the wrong default path (.bin) to its search. The second problem is that the latest jupyter.exe does not support the install_jupyter_labextension() command even though the documentation says it does. This is the way that IJulia documentation suggest you correct a WebIO not found problem and probably what happens behind the scenes when WebIO is built. It does not work. You have to call the other API function, install_jupyter_nbextension() (after correcting the path issue). That finally got WebIO back in action and I can use PlotlyJS again in my Jupyter notebooks. I will post appropriate bug reports when things are a little less hectic

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