OpenGL dependencies not available in ComfyUI
Fix the ComfyUI OpenGL dependencies not available error by restoring PyOpenGL and glfw for the built-in GLSL node.
If ComfyUI logs OpenGL dependencies not available, the built-in GLSL shader node failed its import-time dependency check.
In the tested portable repair lab, this did not kill the whole server. ComfyUI still opened, but nodes_glsl.py could not load until both PyOpenGL and glfw were installed in the same Python environment.
Fast answer
For the GitHub Windows portable package:
.\python_embeded\python.exe -s -m pip show PyOpenGL glfw
.\python_embeded\python.exe -s -m pip install PyOpenGL
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-buildIf the same error remains after that restart, install the second missing package:
.\python_embeded\python.exe -s -m pip install glfwWhat The Real Log Looked Like
In the repaired lab, the relevant lines were:
RuntimeError: OpenGL dependencies not available.
Cannot import ...\ComfyUI\comfy_extras\nodes_glsl.py module for custom nodes: OpenGL dependencies not available.The built-in source check for nodes_glsl.py looks for two Python packages:
glfwOpenGLfromPyOpenGL
If either one is missing, the GLSL node stays unavailable.
Quick Diagnosis
| What You See | Meaning | First Action |
|---|---|---|
OpenGL dependencies not available from nodes_glsl.py | Built-in GLSL node dependency check failed | Install PyOpenGL and glfw in the active ComfyUI Python |
Starting server still appears | Core server survived | Treat this as a partial node-availability failure |
Installing PyOpenGL alone does not clear the error | glfw is still missing | Install glfw next |
| Error happens on Linux without display | Could be a headless display/backend issue too | Check display/EGL/OSMesa separately |
| Node count rises after the second package | GLSL node imported successfully | Good confirmation |
Step 1: Check The Local Requirement Lines
In the tested lab, ComfyUI\requirements.txt included:
PyOpenGL
glfwCheck your local copy:
Get-Content ComfyUI\requirements.txt | Select-String "PyOpenGL|glfw"Step 2: Repair The Missing Packages One At A Time
For Windows portable:
.\python_embeded\python.exe -s -m pip install PyOpenGLRestart ComfyUI and read the log again. In the tested lab, that was not enough. The same OpenGL error remained until glfw was installed too:
.\python_embeded\python.exe -s -m pip install glfwThat is why this page is split out from the bigger runbook. The exact log string is not enough by itself; you need to know that the missing dependency can be either half of the pair.
Step 3: Restart And Verify The GLSL Node Came Back
Relaunch ComfyUI:
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-buildIn the tested lab:
- before
glfw, the OpenGL error still appeared even afterPyOpenGL - after
glfw, the error disappeared /object_infonode count rose from 687 to 688
That last step is the cleanest confirmation that the node imported.
Step 4: Understand The Scope Of The Failure
This error usually means:
- the server can still start
- other nodes may still work
- the GLSL shader node is not available
So this is real, but it is not the same category as a hard startup blocker like missing torch or sqlalchemy.
If your workflow depends on the GLSL node, it is still urgent. If not, you can treat it as a built-in-extra node repair rather than a total ComfyUI outage.
What Not To Do
- do not assume
PyOpenGLalone fixes this error - do not install into system Python if ComfyUI runs from
python_embededor a venv - do not confuse this Windows package-missing case with Linux headless display issues
- do not stop at "the browser opened" if the GLSL node you need is still missing
How Wonderful Launcher Helps
This is another case where "ComfyUI opened" is not the whole story. Wonderful Launcher helps when you need to verify whether the expected node surface came back after a repair, not only whether the web page loads.
Related Guides
- ComfyUI 便携版依赖损坏后,按一个报错一个包修启动
- ModuleNotFoundError: No module named 'kornia' in ComfyUI
- Plugin Missing Module Warning: When It Is Safe to Ignore
- ComfyUI Startup Failed
- ComfyUI Dependency Conflicts
Source References
- Windows portable repair lab, May 18, 2026:
OpenGL dependencies not availableblockedComfyUI\comfy_extras\nodes_glsl.py - Same lab
ComfyUI\requirements.txt:PyOpenGLandglfw - Same lab verification:
PyOpenGLalone did not clear the error; installingglfwafterward restored the GLSL node and raised/object_infonode count from 687 to 688
You can fix it manually, or download Wonderful Launcher for Windows to diagnose plugin errors, missing dependencies, and broken ComfyUI environments without reinstalling.
Download free for WindowsDid this fix your issue?
Your answer helps prioritize verified ComfyUI repairs.