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

NotImplementedError: Platform does not define a GLUT font retrieval function #71

Closed
fyviezhao opened this issue Jan 7, 2022 · 3 comments

Comments

@fyviezhao
Copy link

fyviezhao commented Jan 7, 2022

I'm running a TailorNet project that uses pypoengl on a remote linux machine. It raises an error below:

Traceback (most recent call last):
  File "run_tailornet.py", line 6, in <module>
    from psbody.mesh import Mesh
  File "/data/miniconda3/envs/pytorch/lib/python3.8/site-packages/psbody/mesh/__init__.py", line 10, in <module>
    from .meshviewer import MeshViewer, MeshViewers
  File "/data/miniconda3/envs/pytorch/lib/python3.8/site-packages/psbody/mesh/meshviewer.py", line 49, in <module>
    from OpenGL import GL, GLU, GLUT
  File "/data/miniconda3/envs/pytorch/lib/python3.8/site-packages/OpenGL/GLUT/__init__.py", line 5, in <module>
    from OpenGL.GLUT.fonts import *
  File "/data/miniconda3/envs/pytorch/lib/python3.8/site-packages/OpenGL/GLUT/fonts.py", line 20, in <module>
    p = platform.getGLUTFontPointer( name )
  File "/data/miniconda3/envs/pytorch/lib/python3.8/site-packages/OpenGL/platform/baseplatform.py", line 344, in getGLUTFontPointer
    raise NotImplementedError(
NotImplementedError: Platform does not define a GLUT font retrieval function

Can someone help me with this error? Thanks!

@fyviezhao
Copy link
Author

This can be fixed by sudo apt-get install libosmesa6 plus export PYOPENGL_PLATFORM=osmesa. Closed.

@AndresCasado
Copy link

This is happening to me but I'm using an Arch based distro (Manjaro) and cannot install libosmesa6. I have both mesa and lib32-mesa to provide libOSMesa.so.

export PYOPENGL_PLATFORM=osmesa doesn't seem to work.

I tried creating a symbolic link named libOSMesa.so.6 to check if PyOpenGL was only using version 6 but that didn't work either.

What else can I try to fix this?

@AndresCasado
Copy link

@mcfletch sorry for the direct mention, should I open a new issue for this? Can this issue be reopened?

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