1

我正在关注 Agents.jl 教程(https://juliadynamics.github.io/Agents.jl/stable/examples/schelling/)并在执行这段代码时收到以下错误。任何想法为什么?

using Agents
using InteractiveDynamics
using CairoMakie

groupColor(a) = a.group == 1 ? :blue : :green
groupMarker(a) = a.group == 1 ? :circle : :rect

fig, _ = abm_plot(model, ac = groupColor, am = groupMarker, as = 10)

#Note that abm_plot is a function from InteractiveDynamics.jl which uses makie
#and model is an AgentBasedModel obj created from Agents.jl

#Out > 
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.
4

1 回答 1

0

必须将包从 0.14.6更新InteractiveDynamics到 0.15.1。这个问题的答案可以在下面的帖子中找到。

https://discourse.julialang.org/t/no-backend-available-glmakie-cairomakie-wglmakie/62984/6

于 2021-06-16T10:14:34.140 回答