Setting up Makie on Mac

I had the same problem as this guy (https://discourse.julialang.org/t/no-backend-available-glmakie-cairomakie-wglmakie/62984) with Makie, so I decided to try just GLMakie to figure out what’s going on.

These are my steps, and relevant outputs in the order I performed those. (I’m on a 2016 MBP, with macOS Catalina)

  1. pkg> add GLMakie
    Precompiles successfully.

  2. pkg> test Makie

     Testing GLMakie
┌ Warning: Could not use exact versions of packages in manifest, re-resolving
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Pkg/src/Operations.jl:1526
ERROR: expected package `ReferenceTests [d37af2e0]` to be registered
  1. pkg> add ReferenceTests
    success.

  2. pkg> test ReferenceTests
    some deprecated warnings and this is the summary.

Test Summary:                         | Pass  Error  Total
ReferenceTests                        |   46      1     47
  io2str                              |    7             7
  withcolor                           |    3             3
  string as txt                       |   11            11
  string as unknown file type         |    1             1
  images as txt using ImageInTerminal |    2             2
  plain ansi string                   |    2             2
  string as SHA                       |    3             3
  images as SHA                       |    2             2
  images as PNG                       |    4             4
  Plots as PNG images                 |           1      1
  DataFrame as CSV                    |    2             2
  Create new .csv                     |    2             2
  Create new .png                     |    2             2
  Create new .txt                     |    2             2
  Create new image as txt             |    2             2
ERROR: LoadError: Some tests did not pass: 46 passed, 0 failed, 1 errored, 0 broken.
in expression starting at /Users/rajith/.julia/packages/ReferenceTests/1I8Dn/test/runtests.jl:21
ERROR: Package ReferenceTests errored during testing
  1. pkg> test GLMakie
    same output as (3)

  2. pkg> st ReferenceTests
    [324d217c] ReferenceTests v0.9.7

At this point, I’m not sure what to do next

  1. However I ran the following code segment on Juno (Atom)
using GLMakie

inline!(false)

scene = Scene()


points = [Point2f0(cos(t), sin(t)) for t in LinRange(0, 2pi, 20)]
colors = 1:20
scatter!(scene, points, color = colors, markersize = 15)

everything ran without any issues, however, the output is only a white canvas (displayed at the line scene = Scene() ).

  1. I read somewhere that I may need to build GLMakie, so I did that by pkg> build GLMakie
    Building ModernGL → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/326957556e9cc9253615114c04bb0096a2a69bb8/build.log`
Precompiling project...
  2 dependencies successfully precompiled in 9 seconds (155 already precompiled)
  1. Trying code in (7) again. - same result.

I should note that scatter!(...) returns Scatter{Tuple{Vector{Point{2, Float32}}}}, while the documentation at https://juliahub.com/docs/AbstractPlotting/6fydZ/0.14.1/basic-tutorial.html states the following:

Scene (960px, 540px):
  2 Plots:
    ├ Combined{AbstractPlotting.axis2d,Tuple{Tuple{Tuple{Float32,Float32},Tuple{Float32,Float32}}}}
    └ Combined{AbstractPlotting.scatter,Tuple{Array{Point{2,Float32},1}}}
  1 Child Scene:
    └ Scene (960px, 540px)

which I do not get.

I’m unsure how to proceed from here. Could someone please give a hint on what I can try next.

Thank you!

1 Like

you are not up to date with the syntax. Plus, the documentation link that your are using is outdated. You should use this one.

http://makie.juliaplots.org/dev/
or
http://makie.juliaplots.org/stable/

Was this ever resolved? I’m having the same problem getting GLMakie to work (and no, those links do not help).

what do you get if you do:
in terminal

> mkdir test_glmakie
> cd test_glmakie
> julia
] activate .
pkg> add GLMakie
julia> using GLMakie
julia> lines(1:10) # enter

??

1 Like

That worked after typing it into the MacOS terminal (I had been using the VScode terminal). And when I run that line of code, a window pops up showing a simple line graph.

However, if I run “test GLMakie”, I get an error:

ERROR: expected package ReferenceTests [d37af2e0] to be registered.

Yeah tests aren’t working that easily locally without dev’ing Makie.
I think it’s totally fine not run them :wink:

Why? They should.

I never use that. In vscode I always use a bash terminal and start julia with julia --project in that terminal. The vscode terminal is slowish and you never really know what it is really doing, e.g. which julia parameter it uses.

Because it hasn’t been a priority! This is the first time in years someone running into it, so it certainly doesn’t look like something that should be high up my priority list.

I don’t think that’s generally advised.

Julia: Start REPL (shortcut Alt + J then Alt + O) - this is different from opening a VSCode terminal and launching Julia manually from there, because the integrated Julia REPL allows you to send code from files to the REPL directly.

https://modernjuliaworkflows.github.io/pages/writing/writing/#running_code

Well, everything has advantages and disadvantages. You just need to find a workflow that works for you. I can only say that opening a VSCode terminal and launching Julia manually is faster and gives more reliable and reproducible results. The other way gives extra features. Your choice…