For troubleshooting information, visit the WebIO Not Detected section of the documentation.
This can sometimes present issues if there are multiple versions of JupyterLab installed on a system (e.g. for multiple virtual environments or if installed using Conda and Pip) because these bundles are separate for each JupyterLab installation.
For example, if you installed JupyterLab via
pip install --user jupyterlab and
pip install jupyterlab in a virtualenv at
~/venv, then there will be two bundles (at
~/env/share/jupyter/lab/ respectively, on Linux).
This presents issues when the JupyterLab that is launched is not the JupyterLab that WebIO was installed for (for example, the labextension was installed for the Conda version of JupyterLab but you're launching the version that is installed in a Python virtual environment).
If you suspect that WebIO isn't installed for a specific version of JupyterLab, you can check with the
jupyter labextension list command. First, make sure that you're using the version of JupyterLab that you mean to be using (this usually entails activating the correct Conda environment or Python virtual environment).
$ which jupyter /home/user/.local/bin/jupyter
Then, make sure that the WebIO extension is installed. The output should look something like this (though the specific versions and paths will likely be different).
$ jupyter labextension list JupyterLab v0.35.5 Known labextensions: app dir: /home/user/.julia/conda/3/share/jupyter/lab @webio/jupyter-lab-provider v0.8.3 enabled OK* local extensions: @webio/jupyter-lab-provider: /home/user/.julia/dev/WebIO/packages/jupyter-lab-provider linked packages: @webio/webio: /home/user/.julia/dev/WebIO/packages/webio
If the WebIO extension isn't present, then simply fire up Julia and install it. This can either be done by running
Pkg.build("WebIO") or by running
using WebIO, IJulia WebIO.install_jupyter_labextension()
Find the most likely candidate for the
jupyter executable. This will locate
jupyter by searching the
PATH environment variable and, if not found, tries to return Conda.jl's jupyter. If both of these approaches fail, an error is thrown.
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 provides some more information (and caveats) about the relationship between Jupyter Lab and WebIO.
Install the Jupyter Notebook extension (nbextension) for WebIO. This copies the nbextension code to the appropriate place and writes the appropriate configuration files.
Install necessary configuration for the
jlstaticserve notebook (server) extension. This function only configures the notebook extension, not the browser nbextension or Jupyter Lab extension.
- Adds the path to
sys.pathso that we can load the
jlstaticserve.pyextension. This is done in
jupyter_notebook_config.pybecause there's no way to add to
sys.pathfrom the JSON config file.
jlstaticserveto the list of extensions loaded in the notebook server. This is done in
jupyter_notebook_config.jsonbecause that file has higher precedence when both the
.jsonfiles exist (IPyWidgets, for example, writes to the JSON file, so if we only wrote to the
.pyfile, that directive would take precedence and the
jlstaticserveextension would not be loaded).