MPI-IS / mesh

MPI-IS Mesh Processing Library
Other
643 stars 147 forks source link

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

Open sh1n00 opened 1 year ago

sh1n00 commented 1 year ago

I'm encountering the error below. Colud you help me ?

Enviroment OS:windows11(WSL Ubuntu-20.04) Python: 3.7.15 Anaconda: 1.110 ENV:

PYOPENGL_PLATFORM=egl or osmesa (I tried both)
NotImplementedError                       Traceback (most recent call last)
/tmp/ipykernel_3687/2379041371.py in <module>
      3 from glob import glob
      4 
----> 5 from soma.train.train_soma_multiple import train_multiple_soma

~/soma/src/soma/train/train_soma_multiple.py in <module>
     35 
     36 from soma.tools.parallel_tools import run_parallel_jobs
---> 37 from soma.train.soma_trainer import SOMATrainer
     38 from soma.train.soma_trainer import train_soma_once
     39 

~/soma/src/soma/train/soma_trainer.py in <module>
     49 from torch.optim import lr_scheduler as lr_sched_module
     50 
---> 51 from moshpp.marker_layout.edit_tools import marker_layout_load
     52 from moshpp.marker_layout.labels_map import general_labels_map
     53 from soma.models.soma_model import SOMA

~/anaconda3/envs/soma/lib/python3.7/site-packages/moshpp-3.0-py3.7.egg/moshpp/marker_layout/edit_tools.py in <module>
     51 from human_body_prior.tools.rotation_tools import rotate_points_xyz
     52 from loguru import logger
---> 53 from psbody.mesh import Mesh
     54 
     55 from moshpp.marker_layout.labels_map import general_labels_map

~/anaconda3/envs/soma/lib/python3.7/site-packages/psbody/mesh/__init__.py in <module>
      8 
      9 from .mesh import Mesh
---> 10 from .meshviewer import MeshViewer, MeshViewers
     11 
     12 texture_path = abspath(join(dirname(__file__), '..', 'data', 'template', 'texture_coordinates'))

~/anaconda3/envs/soma/lib/python3.7/site-packages/psbody/mesh/meshviewer.py in <module>
     47 
     48 import numpy as np
---> 49 from OpenGL import GL, GLU, GLUT
     50 from OpenGL.arrays.vbo import VBO
     51 from PIL import Image

~/anaconda3/envs/soma/lib/python3.7/site-packages/OpenGL/GLUT/__init__.py in <module>
      3 
      4 from OpenGL.GLUT.special import *
----> 5 from OpenGL.GLUT.fonts import *
      6 from OpenGL.GLUT.freeglut import *
      7 from OpenGL.GLUT.osx import *

~/anaconda3/envs/soma/lib/python3.7/site-packages/OpenGL/GLUT/fonts.py in <module>
     18         # Win32 just has pointers to values 1,2,3,etc
     19         # GLX has pointers to font structures...
---> 20         p = platform.getGLUTFontPointer( name )
     21     except (ValueError,AttributeError) as err:
     22         if platform.PLATFORM.GLUT:

~/anaconda3/envs/soma/lib/python3.7/site-packages/OpenGL/platform/baseplatform.py in getGLUTFontPointer(self, constant)
    349         """Retrieve a GLUT font pointer for this platform"""
    350         raise NotImplementedError( 
--> 351             """Platform does not define a GLUT font retrieval function"""
    352         )
    353     # names that are normally just references to other items...

NotImplementedError: Platform does not define a GLUT font retrieval function
wangryhen commented 5 months ago

I met the same problem, and have you solved the problem?