Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pyrender on CPU #283

Open
mofibo opened this issue May 21, 2024 · 1 comment
Open

Using pyrender on CPU #283

mofibo opened this issue May 21, 2024 · 1 comment

Comments

@mofibo
Copy link

mofibo commented May 21, 2024

Hello,

I'm running a cpu docker image on EC2 instance, I want to use pyrender on it, but it raises this error:

    import pyrender
  File "/usr/local/lib/python3.8/site-packages/pyrender/__init__.py", line 3, in <module>
    from .light import Light, PointLight, DirectionalLight, SpotLight
  File "/usr/local/lib/python3.8/site-packages/pyrender/light.py", line 10, in <module>
    from OpenGL.GL import *
  File "/usr/local/lib/python3.8/site-packages/OpenGL/GL/__init__.py", line 4, in <module>
    from OpenGL.GL.VERSION.GL_1_1 import *
  File "/usr/local/lib/python3.8/site-packages/OpenGL/GL/VERSION/GL_1_1.py", line 14, in <module>
    from OpenGL.raw.GL.VERSION.GL_1_1 import *
  File "/usr/local/lib/python3.8/site-packages/OpenGL/raw/GL/VERSION/GL_1_1.py", line 7, in <module>
    from OpenGL.raw.GL import _errors
  File "/usr/local/lib/python3.8/site-packages/OpenGL/raw/GL/_errors.py", line 4, in <module>
    _error_checker = _ErrorChecker( _p, _p.GL.glGetError )
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 386, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/lib/python3.8/ctypes/__init__.py", line 391, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: /usr/lib/x86_64-linux-gnu/libOSMesa.so.8: undefined symbol: glGetError

Is there any way to fix it?

Thanks :)

@traversaro
Copy link

Can you try to set the PYOPENGL_PLATFORM=osmesa env variable (assuming that you have mesa installed in your system)? See https://pyrender.readthedocs.io/en/latest/examples/offscreen.html .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants