I just learned how to run julia notebooks in binder. Now I want to use the PlotlyJS package in julia. Usually, when I need a package in julia on binder, I install it locally in a conda environment first and then copy Project.toml and Manifest.toml to my repository to start in binder. This has worked well so far with other packages (like DataFrames.jl). PlotlyJS, however, seems to not only depend on julia but also on python. When I try
using PlotlyJS
it throws an error:
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.
to install WebIO but the error doesn’t go away. I suppose I need to set up environment.yml to include WebIO? I don’t know how to do this, and I honestly don’t know much about python.
In the near term, it might be sufficient to do the following (untested):
# environment.yml
channels:
- conda-forge
- nodefaults
dependencies: # EDIT: was incorrectly `packages`, thanks @manics
- jupyterlab >=3.1,<4 # the docs specify this, but the metadata doesn't
- plotly # might as well have mamba do this
- pip
- pip:
- webio-jupyter-extension
For general ease of consumption on binder (e.g. to capture more of the dependency metadata), we’d probably want webio_jupyter_extension to be packaged on conda-forge… I’ve requested it, but can’t guarantee when i’d have time to actually execute on it myself.
There’s an error in environment.yml which is silently ignored (conda also ignores the error):
$ mamba env update --file environment.yml
EnvironmentSectionNotValid: The following section on '/home/jovyan/environment.yml' is invalid and will be ignored:
- packages
Thank you, manics and bollwyvl! With manics’ correction to bollwyvl’s environment.yml everything works. This is the environment.yml to use:
# environment.yml
channels:
- conda-forge
- nodefaults
dependencies:
- jupyterlab >=3.1,<4 # the docs specify this, but the metadata doesn't
- plotly # might as well have mamba do this
- pip
- pip:
- webio-jupyter-extension