# How to run a Julia page example using GLMakie?

**URL:** <https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602>\
**Category:** Visualization\
**Tags:** question, package, plotting, makie, glmakie\
**Created:** [August 18, 2021, 1:56pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602 "2021-08-18T13:56:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoaoFlauzino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaoflauzino/32/28285_2.png) [@JoaoFlauzino](https://discourse.julialang.org/u/JoaoFlauzino)\
**Post date:** [August 18, 2021, 1:56pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/1 "2021-08-18T13:56:40Z")

</div>

I just can’t run the example available here  
[https://juliadynamics.github.io/InteractiveDynamics.jl/dev/cobweb/](https://juliadynamics.github.io/InteractiveDynamics.jl/dev/cobweb/)

I copied and pasted this code and when I run it doesn’t work. I’ve already tried `]build GLMakie` .

```julia
using InteractiveDynamics, GLMakie, DynamicalSystems

# the second range is a convenience for intermittency example of logistic
rrange = 1:0.001:4.0
# rrange = (rc = 1 + sqrt(8); [rc, rc - 1e-5, rc - 1e-3])

lo = Systems.logistic(0.4; r=rrange[1])

interactive_cobweb(lo, rrange, 5)

```

This should return me an interactive diagram, but appears to me:

```julia
ERROR: LoadError: No backend available (GLMakie, CairoMakie, WGLMakie)!
Maybe you imported GLMakie but it didn't build correctly.
In that case, try `]build GLMakie` and watch out for any warnings.
If that's not the case, make sure to explicitely import any of the mentioned backends.

Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] backend_display(#unused#::Missing, #unused#::Scene)
   @ Makie ~/.julia/packages/Makie/c5WJV/src/display.jl:43
 [3] display
   @ ~/.julia/packages/Makie/c5WJV/src/display.jl:62 [inlined]
 [4] display
   @ ~/.julia/packages/Makie/c5WJV/src/display.jl:52 [inlined]
 [5] interactive_cobweb(ds::DiscreteDynamicalSystem{false, Float64, 1, typeof(DynamicalSystemsBase.Systems.logistic_rule), Vector{Float64}, typeof(DynamicalSystemsBase.Systems.logistic_jacob), Float64, false}, prange::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, O::Int64; fkwargs::Vector{NamedTuple{(:linewidth, :color), Tuple{Float64, ColorTypes.RGBA{Float32}}}}, trajcolor::Symbol, pname::String, xmin::Float64, xmax::Float64, Tmax::Int64, pindex::Int64, x0s::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}})
   @ InteractiveDynamics ~/.julia/packages/InteractiveDynamics/rKq1q/src/chaos/cobweb.jl:132
 [6] interactive_cobweb(ds::DiscreteDynamicalSystem{false, Float64, 1, typeof(DynamicalSystemsBase.Systems.logistic_rule), Vector{Float64}, typeof(DynamicalSystemsBase.Systems.logistic_jacob), Float64, false}, prange::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, O::Int64)
   @ InteractiveDynamics ~/.julia/packages/InteractiveDynamics/rKq1q/src/chaos/cobweb.jl:36
 [7] top-level scope
   @ ~/Disciplinas/Dinâmica de Sistemas Não-lineares/exemplo_cobweb.jl:11
 [8] include(fname::String)
   @ Base.MainInclude ./client.jl:444
 [9] top-level scope
   @ REPL[5]:1
in expression starting at /home

```

I’ve already tried `]add GLMakie, Makie, CairoMakie.`; update my packages using the `update` command from the package manager prompt; in the main Julia project, type `using Pkg; Pkg.precompile()`.  
What can I do?

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [August 18, 2021, 3:26pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/2 "2021-08-18T15:26:25Z")

</div>

The error message suggests trying `]build GLMakie`, did that produce any errors or warnings?

What is the output of `]st`?

This example works for me in this temporary environment:

```julia
(@v1.6) pkg> activate --temp
  Activating new environment at `/tmp/jl_B4xk0q/Project.toml`

(jl_B4xk0q) pkg> add InteractiveDynamics GLMakie DynamicalSystems

<snip installation>

(jl_B4xk0q) pkg> st
      Status `/tmp/jl_B4xk0q/Project.toml`
  [61744808] DynamicalSystems v2.0.1
  [e9467ef8] GLMakie v0.4.4
  [ec714cd0] InteractiveDynamics v0.17.2

```

---

<div class="post-metadata">

**Author:** ![JoaoFlauzino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaoflauzino/32/28285_2.png) [@JoaoFlauzino](https://discourse.julialang.org/u/JoaoFlauzino)\
**Post date:** [August 18, 2021, 3:36pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/3 "2021-08-18T15:36:28Z")

</div>

Yes, I’ve already tried `]build GLMakie`.  
Here is the output of `]st`:

 ![Captura de tela de 2021-08-18 09-46-06](https://global.discourse-cdn.com/julialang/original/3X/a/6/a6de26543b2b4c0dcf1ee5aa4428b3b5357e4b65.png)

Now I realized that GLMakie was for some reason out of date. So I typed `add WebIO#master` and updated everything and now GLMakie is updated to version 0.4.4.  
However it is still giving the following problem:

````julia
 Warning: GLFW couldn't create an OpenGL window.
│ This likely means, you don't have an OpenGL capable Graphic Card,
│ or you don't have an OpenGL 3.3 capable video driver installed.
│ Have a look at the troubleshooting section in the GLMakie readme:
│ https://github.com/JuliaPlots/Makie.jl/tree/master/GLMakie#troubleshooting-opengl.
└ @ GLMakie ~/.julia/packages/GLMakie/rXGL8/src/screen.jl:336
ERROR: LoadError: GLFWError (API_UNAVAILABLE): GLX: No GLXFBConfigs returned
Stacktrace:```
````

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [August 18, 2021, 3:41pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/4 "2021-08-18T15:41:21Z")

</div>

You probably need to restart Julia after doing that update.

---

<div class="post-metadata">

**Author:** ![JoaoFlauzino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaoflauzino/32/28285_2.png) [@JoaoFlauzino](https://discourse.julialang.org/u/JoaoFlauzino)\
**Post date:** [August 18, 2021, 3:50pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/5 "2021-08-18T15:50:55Z")

</div>

Yes, I restarted Julia. I even restarted my computer.

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [August 18, 2021, 3:55pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/6 "2021-08-18T15:55:24Z")

</div>

Huh, I may be out of ideas then. Can you run other OpenGL tools outside of Julia? Maybe glxgears?

---

<div class="post-metadata">

**Author:** ![JoaoFlauzino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaoflauzino/32/28285_2.png) [@JoaoFlauzino](https://discourse.julialang.org/u/JoaoFlauzino)\
**Post date:** [August 18, 2021, 4:00pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/7 "2021-08-18T16:00:50Z")

</div>

Yes!

 ![Captura de tela de 2021-08-18 12-59-53](https://global.discourse-cdn.com/julialang/original/3X/6/6/664f713b9201cc52ec4c61b5633901c963488dfa.png)

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [August 18, 2021, 4:10pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/8 "2021-08-18T16:10:07Z")

</div>

OK, that’s a start! How about the output of these 2 commands:

```julia
$ glxinfo -B

```

The important line from this one is “OpenGL core profile version string”, that is the one that must be 3.3 or greater as described in the error message you got.

and

```julia
$ glxinfo | grep GLXFB

```

I get `311 GLXFBConfigs:` for this one, I suspect any non-empty output is good.

If both of these look good, then I am out of ideas. If one of these is off, then you may need to investigate newer drivers or newer hardware.

---

<div class="post-metadata">

**Author:** ![JoaoFlauzino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaoflauzino/32/28285_2.png) [@JoaoFlauzino](https://discourse.julialang.org/u/JoaoFlauzino)\
**Post date:** [August 18, 2021, 4:19pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/9 "2021-08-18T16:19:40Z")

</div>

> [@contradict](#):
>
> `$ glxinfo -B`

So I think you must be out of ideas, because it looks like it’s ok.

 ![Captura de tela de 2021-08-18 13-17-33](https://global.discourse-cdn.com/julialang/original/3X/6/2/62175cfac55d6a5c1239df21422a3de868b7518c.png)

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [August 18, 2021, 4:25pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/10 "2021-08-18T16:25:52Z")

</div>

This discussion looks relevant, perhaps something here might help:

[https://github.com/JuliaGL/GLFW.jl/issues/194](https://github.com/JuliaGL/GLFW.jl/issues/194)

[https://github.com/JuliaPackaging/Yggdrasil/pull/3192](https://github.com/JuliaPackaging/Yggdrasil/pull/3192)

---

<div class="post-metadata">

**Author:** ![JoaoFlauzino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaoflauzino/32/28285_2.png) [@JoaoFlauzino](https://discourse.julialang.org/u/JoaoFlauzino)\
**Post date:** [August 18, 2021, 4:26pm UTC](https://discourse.julialang.org/t/how-to-run-a-julia-page-example-using-glmakie/66602/11 "2021-08-18T16:26:57Z")

</div>

I will read. Thank you very much!
