Open mayoudong1993 opened 4 years ago
Hi @mayoudong1993,
We didn't test our code on Windows, so it is a bit difficult to figure out the problem. And it seems the problem is related to pyrender installation, so I would suggest you to refer pyrender docs/issues to find a solution.
@mkocabas @mayoudong1993 This problem should not be from pyrender. The biggest problem is the code : os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py.
It will use EGL as OpenGL Platform. So when initializing opengl, the problem
raise ImportError("Unable to load EGL library", *err.args)
occured.
(1) About EGL on Windows system In fact, there is nothing like egl.dll in python\Lib\site-packages\OpenGL\DLLS\, so it can't load EGL library.
(2) As for pyrender Pyrender\offscreen.py
def _create(self):
if 'PYOPENGL_PLATFORM' not in os.environ:
from pyrender.platforms.pyglet_platform import PygletPlatform
self._platform = PygletPlatform(self.viewport_width,
self.viewport_height)
elif os.environ['PYOPENGL_PLATFORM'] == 'egl':
from pyrender.platforms import egl
device_id = int(os.environ.get('EGL_DEVICE_ID', '0'))
egl_device = egl.get_device_by_index(device_id)
self._platform = egl.EGLPlatform(self.viewport_width,
self.viewport_height,
device=egl_device)
The default is PygletPlatform.
So just comment os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py.
It works well on my experiment. (Win10 64 bit)
Thanks @StephenGreat for the solution. Is this the only modification you did to make VIBE work on Windows?
Thanks @StephenGreat for the solution. Is this the only modification you did to make VIBE work on Windows?
You need to install ffmpeg (windows latest version) which can download from official website. Put ffmpeg.exe in system variable Path. Other settings are same as requirements.txt https://github.com/mkocabas/VIBE/blob/master/requirements.txt Any questions are welcome.
@mkocabas @mayoudong1993 This problem should not be from pyrender. The biggest problem is the code : os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It will use EGL as OpenGL Platform. So when initializing opengl, the problem
raise ImportError("Unable to load EGL library", *err.args)
occured.(1) About EGL on Windows system In fact, there is nothing like egl.dll in python\Lib\site-packages\OpenGL\DLLS, so it can't load EGL library.
(2) As for pyrender Pyrender\offscreen.py
def _create(self): if 'PYOPENGL_PLATFORM' not in os.environ: from pyrender.platforms.pyglet_platform import PygletPlatform self._platform = PygletPlatform(self.viewport_width, self.viewport_height) elif os.environ['PYOPENGL_PLATFORM'] == 'egl': from pyrender.platforms import egl device_id = int(os.environ.get('EGL_DEVICE_ID', '0')) egl_device = egl.get_device_by_index(device_id) self._platform = egl.EGLPlatform(self.viewport_width, self.viewport_height, device=egl_device)
The default is PygletPlatform. So just comment os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It works well on my experiment. (Win10 64 bit)
After commenting this line I got 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"". I'm trying to render the results on a ubuntu server.
@mkocabas @mayoudong1993 This problem should not be from pyrender. The biggest problem is the code : os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It will use EGL as OpenGL Platform. So when initializing opengl, the problem
raise ImportError("Unable to load EGL library", *err.args)
occured. (1) About EGL on Windows system In fact, there is nothing like egl.dll in python\Lib\site-packages\OpenGL\DLLS, so it can't load EGL library. (2) As for pyrender Pyrender\offscreen.pydef _create(self): if 'PYOPENGL_PLATFORM' not in os.environ: from pyrender.platforms.pyglet_platform import PygletPlatform self._platform = PygletPlatform(self.viewport_width, self.viewport_height) elif os.environ['PYOPENGL_PLATFORM'] == 'egl': from pyrender.platforms import egl device_id = int(os.environ.get('EGL_DEVICE_ID', '0')) egl_device = egl.get_device_by_index(device_id) self._platform = egl.EGLPlatform(self.viewport_width, self.viewport_height, device=egl_device)
The default is PygletPlatform. So just comment os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It works well on my experiment. (Win10 64 bit)
After commenting this line I got 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"". I'm trying to render the results on a ubuntu server.
Hi, have you solved it? I meet it too.....
Hi, # apt-get install libosmesa6-dev freeglut3-dev
fixes the issue.
@mkocabas @mayoudong1993 This problem should not be from pyrender. The biggest problem is the code : os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It will use EGL as OpenGL Platform. So when initializing opengl, the problem
raise ImportError("Unable to load EGL library", *err.args)
occured. (1) About EGL on Windows system In fact, there is nothing like egl.dll in python\Lib\site-packages\OpenGL\DLLS, so it can't load EGL library. (2) As for pyrender Pyrender\offscreen.pydef _create(self): if 'PYOPENGL_PLATFORM' not in os.environ: from pyrender.platforms.pyglet_platform import PygletPlatform self._platform = PygletPlatform(self.viewport_width, self.viewport_height) elif os.environ['PYOPENGL_PLATFORM'] == 'egl': from pyrender.platforms import egl device_id = int(os.environ.get('EGL_DEVICE_ID', '0')) egl_device = egl.get_device_by_index(device_id) self._platform = egl.EGLPlatform(self.viewport_width, self.viewport_height, device=egl_device)
The default is PygletPlatform. So just comment os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It works well on my experiment. (Win10 64 bit)
After commenting this line I got 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"". I'm trying to render the results on a ubuntu server.
Hi, have you solved it? I meet it too.....
I would also be interested in a solution specifically for windows 10 and python 3.7.
@mkocabas @mayoudong1993 This problem should not be from pyrender. The biggest problem is the code : os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It will use EGL as OpenGL Platform. So when initializing opengl, the problem
raise ImportError("Unable to load EGL library", *err.args)
occured. (1) About EGL on Windows system In fact, there is nothing like egl.dll in python\Lib\site-packages\OpenGL\DLLS, so it can't load EGL library. (2) As for pyrender Pyrender\offscreen.pydef _create(self): if 'PYOPENGL_PLATFORM' not in os.environ: from pyrender.platforms.pyglet_platform import PygletPlatform self._platform = PygletPlatform(self.viewport_width, self.viewport_height) elif os.environ['PYOPENGL_PLATFORM'] == 'egl': from pyrender.platforms import egl device_id = int(os.environ.get('EGL_DEVICE_ID', '0')) egl_device = egl.get_device_by_index(device_id) self._platform = egl.EGLPlatform(self.viewport_width, self.viewport_height, device=egl_device)
The default is PygletPlatform. So just comment os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It works well on my experiment. (Win10 64 bit)
After commenting this line I got 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"". I'm trying to render the results on a ubuntu server.
Hi, have you solved it? I meet it too.....
I would also be interested in a solution specifically for windows 10 and python 3.7.
have you solved this problem?please contact me with qq:1305966853,thank you very much!
comment os.environ['PYOPENGL_PLATFORM'] = 'egl' is effective, but it doesn't seem to be the main reason. I fixed it by install pyglet==1.5.24. And 1.5.20 or newer 2.0.0 all have error of no GLU or Unable to load EGL.
sudo apt-get install libglfw3-dev libgles2-mesa-dev
This saved my life
Thanks @StephenGreat for the solution. Is this the only modification you did to make VIBE work on Windows?
You need to install ffmpeg (windows latest version) which can download from official website. Put ffmpeg.exe in system variable Path. Other settings are same as requirements.txt https://github.com/mkocabas/VIBE/blob/master/requirements.txt Any questions are welcome.
I have installed ffmpeg.exe, and passed the CMD test, but there is still an ImportError: ('Unable to load EGL library', "Could not find module 'EGL' (or one of its dependencies). Try using the full path with constructor syntax.", 'EGL', None) I am using the script from https://github.com/eth-siplab/AvatarPoser thanks for your help
comment os.environ['PYOPENGL_PLATFORM'] = 'egl' is effective, but it doesn't seem to be the main reason. I fixed it by install pyglet==1.5.24. And 1.5.20 or newer 2.0.0 all have error of no GLU or Unable to load EGL.
Hi, may I ask how you installed pyglet==1.5.24? I tried downloading it using the source code zip folder, but it still has the same GLUE and EGL issues. Thanks!
@mkocabas @mayoudong1993 This problem should not be from pyrender. The biggest problem is the code : os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It will use EGL as OpenGL Platform. So when initializing opengl, the problem occured.
raise ImportError("Unable to load EGL library", *err.args)
(1) About EGL on Windows system In fact, there is nothing like egl.dll in python\Lib\site-packages\OpenGL\DLLS, so it can't load EGL library.
(2) As for pyrender Pyrender\offscreen.py
def _create(self): if 'PYOPENGL_PLATFORM' not in os.environ: from pyrender.platforms.pyglet_platform import PygletPlatform self._platform = PygletPlatform(self.viewport_width, self.viewport_height) elif os.environ['PYOPENGL_PLATFORM'] == 'egl': from pyrender.platforms import egl device_id = int(os.environ.get('EGL_DEVICE_ID', '0')) egl_device = egl.get_device_by_index(device_id) self._platform = egl.EGLPlatform(self.viewport_width, self.viewport_height, device=egl_device)
The default is PygletPlatform. So just comment os.environ['PYOPENGL_PLATFORM'] = 'egl' in demo.py. It works well on my experiment. (Win10 64 bit)
After commenting this line,the error ImportError: ('Unable to load EGL library', 22, '找不到指定的模块。', None, 126, None, 'EGL', None) remain the same,this solution doesn't work.
I would also be interested in a solution specifically for windows 10 and python 3.7.
I am also stuck becuase of EGL issue. Anyone have any idea how to fix this on Windows 11.
Traceback (most recent call last):
File "inference.py", line 188, in
Hi, I meet the same error when running slurm_inference.sh of https://github.com/caizhongang/SMPLer-X. Could any one give a solution ? Thanks
My operation system is Windows 10, and my GPU driver is GeForce Game Ready Driver. I got this error below, could you give me some hints, what's this error talking about?
Traceback (most recent call last): File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\platform\egl.py", line 70, in EGL mode=ctypes.RTLD_GLOBAL File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\platform\ctypesloader.py", line 45, in loadLibrary return dllType( name, mode ) File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\ctypes__init.py", line 364, in init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] 找不到指定的模块。
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:/projects/pycharm/VIBE/demo.py", line 33, in
from lib.utils.renderer import Renderer
File "C:\projects\pycharm\VIBE\lib\utils\renderer.py", line 19, in
import pyrender
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\pyrender__init.py", line 3, in
from .light import Light, PointLight, DirectionalLight, SpotLight
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\pyrender\light.py", line 11, in
from .texture import Texture
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\pyrender\texture.py", line 8, in
from OpenGL.GL import *
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\GL__init.py", line 3, in
from OpenGL import error as _error
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\error.py", line 12, in
from OpenGL import platform, _configflags
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\platform__init__.py", line 35, in
_load()
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\platform\ init__.py", line 32, in _load
plugin.install(globals())
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\platform\baseplatform.py", line 92, in install
namespace[ name ] = getattr(self,name,None)
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get
value = self.fget( obj )
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\platform\egl.py", line 93, in GetCurrentContext
return self.EGL.eglGetCurrentContext
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get__
value = self.fget( obj )
File "C:\Users\youdo\anaconda3\envs\vibe-env\lib\site-packages\OpenGL\platform\egl.py", line 73, in EGL
raise ImportError("Unable to load EGL library", *err.args)
ImportError: ('Unable to load EGL library', 22, '找不到指定的模块。', None, 126, None, 'EGL', None)