Plotly causes WebIO error in Julia Notebook

When I try to use Plotly in Julia Notebook, I get the following error:

WebIO not detected.

Please read the troubleshooting guide for more information on how to resolve this issue.

https://juliagizmos.github.io/WebIO.jl/latest/troubleshooting/not-detected/

Here is the process I used to install julia and configure:

python -m venv julia
source julia/bin/activate
python -m pip install --upgrade pip
python -m pip install jupyter jupyterlab webio_jupyter_extension

curl -fsSL https://install.julialang.org | sh -s -- --default-channel=lts

julia
julia> using Pkg
julia> pkg"add IJulia"
julia> pkg"add Plotly"
julia> using IJulia
julia> notebook()

Then in the notebook:

using Plotly
my_plot = plot([scatter(x=[1,2], y=[3,4])], Layout(title="My plot"))

This is when I get the error mentioned above. I have tried a couple different versions of python and julia… 1.11.3 has an issue building WebIO, so I am using LTS here. Any help appreciated.

I would suggest to try using directly PlotlyLight.jl or PlotlyBase.jl if you just want to use it in jupyter as you don’t definitely need the WebIO part in jupyter and that is the cause of most problems with PlotlyJS and derivatives…