Open JonathanLehner opened 5 years ago
will try loading mesa-glu/9.0.0
Try sudo apt install freeglut3-dev
.
Hey @JonathanLehner,
How did you resolve this issue on Leonhard? I work on another project, yet I couldn't find how to run the code that uses OpenGL on server. I loaded ftgl/2.1.3
module (which also includes mesa/12.0.3
and mesa-glu/9.0.0
), but it didn't help.
Trying to run the script normally gives this error
ValueError: Failed to initialize Pyglet window with an OpenGL >= 3+ context. If you're logged in via SSH, ensure that you're running your script with vglrun (i.e. VirtualGL). The internal error message was "Cannot connect to "None""
and prepending PYOPENGL_PLATFORM=osmesa
to the python command gives
ImportError: ('Unable to load OpenGL library', 'OSMesa: cannot open shared object file: No such file or directory', 'OSMesa', None)
I would be really happy to hear your comment. Cheers.
I am experiencing the same issue as @dcetin described above.
Fix for me: sudo apt-get install libosmesa6-dev
On Arch linux I installed python-opengl
and freeglut
but was still getting this error. Installing the package glu
fixed the problem for me -
sudo pacman -S freeglut python-opengl glu
I tried to run pyrender on the Leonard cluster at ETH Zurich. https://scicomp.ethz.ch/wiki/Leonhard_applications_and_libraries
I get the following error:
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyglet/init.py", line 351, in getattr return getattr(self._module, name) AttributeError: 'NoneType' object has no attribute 'Window'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyglet/init.py", line 351, in getattr return getattr(self._module, name) AttributeError: 'NoneType' object has no attribute '_create_shadow_window'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "full_pipeline.py", line 354, in
import pyrender
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyrender/init.py", line 12, in
from .viewer import Viewer
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyrender/viewer.py", line 36, in
class Viewer(pyglet.window.Window):
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyglet/init.py", line 357, in getattr
import(import_name)
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyglet/window/init.py", line 1872, in
gl._create_shadow_window()
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyglet/init.py", line 357, in getattr
import(import_name)
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyglet/gl/init.py", line 100, in
from pyglet.gl.lib import GLException
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyglet/gl/lib.py", line 143, in
from pyglet.gl.lib_glx import link_GL, link_GLU, link_GLX
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyglet/gl/lib_glx.py", line 51, in
glu_lib = pyglet.lib.load_library('GLU')
File "/cluster/home/lehnerj/.local/share/virtualenvs/wearable3dhandreconstruction--fu_gjdO/lib/python3.6/site-packages/pyglet/lib.py", line 168, in load_library
raise ImportError('Library "%s" not found.' % names[0])
ImportError: Library "GLU" not found.