You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report, @HealthyPear . It's possible that some extra setup is required off screen rendering on a mac -- I'll check it out later today on my laptop, will let you know what I find!
Ok, so on the yt_idv side, I do think there's an issue with how environment variables are being set (this issue actually). Before importing yt_idv, you'll need to set PYOPENGL_PLATFORM='egl'. You can do this as an environment variable from your shell (e.g., export PYOPENGL_PLATFORM='egl') before starting your python session or from within your python session/script, just make sure it happens before all other imports:
import os
os.environ['PYOPENGL_PLATFORM'] = 'egl'
import yt_idv
# etc..
If you've not separately installed any EGL-related libraries, you'll get a new error related to EGL not being found. For headless rendering, you'll need to separately install EGL or osmesa. We do need some improved documentation for this in yt_idv (at a minimum describing the requirements for headless rendering that yt_idv does not install for you). Unfortunately I don't yet have good instructions for you on a mac (working on it.... hopefully soon...). On my linux machines, I usually install the required packages as system level installs: for osmesa on ubuntu it's just sudo apt-get install libosmesa6-dev, for egl I follow these instructions. On a mac things don't seem quite as straightforward so far. There is a brew recipe for the mesa libraries that installed OK for me but i haven't yet got it working with yt_idv. I also just noticed the mesalib conda package that may also work but I haven't tested it yet. In any case, I'll update here if I actually get the headless rendering working on a mac.
Description
Off-screen Volume Rendering example on macos 14.7
What I Did
just ran the example then got
same with "cgl"
The text was updated successfully, but these errors were encountered: