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

module 'pyglet.gl' has no attribute 'xlib' #8

Closed
Xingang1990 opened this issue May 25, 2020 · 5 comments
Closed

module 'pyglet.gl' has no attribute 'xlib' #8

Xingang1990 opened this issue May 25, 2020 · 5 comments

Comments

@Xingang1990
Copy link

I met with the error when I tried the example codes in the Github document. Could you let me know why?

@marian42
Copy link
Owner

This might be a problem related to rendering. What operating system and GPU do you use?

@Rouen007
Copy link

Rouen007 commented May 27, 2020

In win10, i got the same error (and mac as well) with PyopenGL 3.1.0 (pyrender 0.1.40)
image

@Xingang1990
Copy link
Author

@Rouen007 @marian42 Thank you for your attention and comments. I am also using Mac OS and windows 10. I solved the problem on Mac OS. I found that mesh-to-sdf depends on pyrender and pyrender depends on pyglet. Also the version of pyglet should be 1.4.0b1. See the following link for a detailed explanation. https://pyrender.readthedocs.io/en/latest/install/index.html#python-installation
But the latest version of pyrender is 0.1.40 and it requires pyglet version be above 1.5.5 (if my memory works for me well), so pyglet of 1.4.0b1 doesn’t work for it. In addition, it seems that pyrender doesn’t work well in python 3.7 which I used at first.
There may be more elegant way to solve this problem. Here is my solution and it works for my Mac. 1. Conda create python 3.6 environment. 2. Conda install pyrender 0.1.30 (older version). 3. Uninstall pyglet (default version came with pyrender). 4. Install pyglet 1.4.0b1 following the instructions of the link above. 5. Don’t forget to install mesh-to-sdf, numpy and other packages for the new environment. 6. Work done. Run the examples of mesh-to-sdf.

@Rouen007
Copy link

@Rouen007 @marian42 Thank you for your attention and comments. I am also using Mac OS and windows 10. I solved the problem on Mac OS. I found that mesh-to-sdf depends on pyrender and pyrender depends on pyglet. Also the version of pyglet should be 1.4.0b1. See the following link for a detailed explanation. https://pyrender.readthedocs.io/en/latest/install/index.html#python-installation
But the latest version of pyrender is 0.1.40 and it requires pyglet version be above 1.5.5 (if my memory works for me well), so pyglet of 1.4.0b1 doesn’t work for it. In addition, it seems that pyrender doesn’t work well in python 3.7 which I used at first.
There may be more elegant way to solve this problem. Here is my solution and it works for my Mac. 1. Conda create python 3.6 environment. 2. Conda install pyrender 0.1.30 (older version). 3. Uninstall pyglet (default version came with pyrender). 4. Install pyglet 1.4.0b1 following the instructions of the link above. 5. Don’t forget to install mesh-to-sdf, numpy and other packages for the new environment. 6. Work done. Run the examples of mesh-to-sdf.

Thank you very much. And I handle the issue by "pip install mesh-to-sdf numpy PyOpenGL PyOpenGL-accelerate sklearn pyrender==0.1.36 scikit-image==0.15.0" in Python3.6 environment.

@Xingang1990
Copy link
Author

Great! It seems we have identified several alternative ways to solve the problem. Let me close this question.

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