pyglet error
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
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