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

Some error I got #126

Open
czxc77225 opened this issue Oct 5, 2022 · 2 comments
Open

Some error I got #126

czxc77225 opened this issue Oct 5, 2022 · 2 comments

Comments

@czxc77225
Copy link

I run the command : python demo.py --checkpoint=data/model_checkpoint.pt --img=examples/im1010.jpg
bue after that Igot this error.

Traceback (most recent call last):
File "demo.py", line 36, in
from utils.renderer import Renderer
File "C:\Users\Sam\PycharmProjects\photowakeup\SPIN-master\utils\renderer.py", line 6, in
import pyrender
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\pyrender_init_.py", line 3, in
from .light import Light, PointLight, DirectionalLight, SpotLight
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\pyrender\light.py", line 10, in
from OpenGL.GL import *
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\GL_init_.py", line 3, in
from OpenGL import error as _error
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\error.py", line 12, in
from OpenGL import platform, configflags
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform_init
.py", line 35, in
load()
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform_init
.py", line 32, in _load
plugin.install(globals())
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\baseplatform.py", line 92, in install
namespace[ name ] = getattr(self,name,None)
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get
value = self.fget( obj )
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\osmesa.py", line 66, in GetCurrentContext
function = self.OSMesa.OSMesaGetCurrentContext
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get
value = self.fget( obj )
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\osmesa.py", line 60, in OSMesa
def OSMesa( self ): return self.GL
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get
value = self.fget( obj )
File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\osmesa.py", line 28, in GL
raise ImportError("Unable to load OpenGL library", *err.args)
ImportError: ('Unable to load OpenGL library', "Could not find module 'OSMesa' (or one of its dependencies). Try using the full path with constructor syntax.", 'OSMesa', None)

It seems like some problem occored on OpenGL.
I wonder if I use a wrong version of python,which version should I use?
Or is it happened by other reason?

@SER1205
Copy link

SER1205 commented Nov 16, 2022

I run the command : python demo.py --checkpoint=data/model_checkpoint.pt --img=examples/im1010.jpg bue after that Igot this error.

Traceback (most recent call last): File "demo.py", line 36, in from utils.renderer import Renderer File "C:\Users\Sam\PycharmProjects\photowakeup\SPIN-master\utils\renderer.py", line 6, in import pyrender File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\pyrender__init__.py", line 3, in from .light import Light, PointLight, DirectionalLight, SpotLight File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\pyrender\light.py", line 10, in from OpenGL.GL import * File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\GL__init__.py", line 3, in from OpenGL import error as error File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\error.py", line 12, in from OpenGL import platform, configflags File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform__init.py", line 35, in load() File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform__init_.py", line 32, in _load plugin.install(globals()) File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\baseplatform.py", line 92, in install namespace[ name ] = getattr(self,name,None) File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get value = self.fget( obj ) File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\osmesa.py", line 66, in GetCurrentContext function = self.OSMesa.OSMesaGetCurrentContext File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get value = self.fget( obj ) File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\osmesa.py", line 60, in OSMesa def OSMesa( self ): return self.GL File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\baseplatform.py", line 14, in get value = self.fget( obj ) File "C:\Users\Sam\PycharmProjects\photowakeup\venv\lib\site-packages\OpenGL\platform\osmesa.py", line 28, in GL raise ImportError("Unable to load OpenGL library", *err.args) ImportError: ('Unable to load OpenGL library', "Could not find module 'OSMesa' (or one of its dependencies). Try using the full path with constructor syntax.", 'OSMesa', None)

It seems like some problem occored on OpenGL. I wonder if I use a wrong version of python,which version should I use? Or is it happened by other reason?

I also have this question.Did you fix this?

@Gauravjha2900
Copy link

Gauravjha2900 commented Dec 19, 2022

I think OSMesa is not installed in your system, that's why you are facing this error
you can refer to this two website for OSMesa :-

  1. https://github.com/larskanis/osmesa/blob/master/README.md
  2. https://pyrender.readthedocs.io/en/latest/install/index.html

on Ubuntu/Debian:
sudo apt-get install libosmesa6-dev

on Windows: No need to install dependencies - the binary gem includes everything
Install the gem:
gem install osmesa

or
you can use this yml file to create conda environment and run the demo code
https://drive.google.com/file/d/1_sgYKsexhkU0cZfSPHVLhDdARgj7V0ao/view?usp=sharing

But I think the above command will solve the issue for sure

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

3 participants