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

Gym on Mac OS X Big Sur #2101

Closed
marcelovidigal opened this issue Nov 18, 2020 · 25 comments
Closed

Gym on Mac OS X Big Sur #2101

marcelovidigal opened this issue Nov 18, 2020 · 25 comments

Comments

@marcelovidigal
Copy link

After updating OS all my scripts stopped working, most of the errors related to pyglet, and paths to some libraries, some errors that I came across:

Error occurred while running `from pyglet.gl import *`
HINT: make sure you have OpenGL install. On Ubuntu, you can run 'apt-get install python-opengl'.
If you're running on a server, you may need a virtual frame buffer; something like this should work:
'xvfb-run -s "-screen 0 1400x900x24" python <your_script.py>'

ImportError: Can't find framework /System/Library/Frameworks/OpenGL.framework.

I researched, and tried, various possible solutions on the internet, but nothing solved, does anyone have an idea of how to fix this problem, I appreciate any help, I'm using python 3.8, but I tried on 3.7 too, and I was unsuccessful.

@WayenVan
Copy link

I have the same problem, is that means the OpenGl didn't be installed properly?

@WayenVan
Copy link

Well,there are some solutions. I have not tried them yet, good luck!

@DarioBernardo
Copy link

I had the same problem, and installing pyglet==1.5.11 (as suggested in the discussion linked by @WayenVan) solved the issue.

@kochsebastian
Copy link

@DarioBernardo How can you install pyglet==1.5.11 when the newest version of gym (0.17.3) requires pyglet between 1.4 and 1.5 at least according to my error message:
gym 0.17.3 requires pyglet<=1.5.0,>=1.4.0, but you'll have pyglet 1.5.11 which is incompatible

@DarioBernardo
Copy link

I get the same error, however pyglet get installed (I get "Successfully installed pyglet-1.5.11" message after the error). In fact when i try to run my code again it actually works. Try, I think should work for you as well if the pyglet get actually installed as it happens for me.

@kochsebastian
Copy link

@DarioBernardo Yes you are 100% correct. It did get installed and now gym runs without an error

@lix4
Copy link

lix4 commented Nov 28, 2020

@DarioBernardo You are my lifesaver.

@emnabarred
Copy link

@DarioBernardo I did the same but when I run my code it still doesn't work 😅

@K-tang-mkv
Copy link

@DarioBernardo Thanks for your help. I got the same error from pyglet and I try the method pip install pyglet==1.5.11 then the issue was addressed!

@takumijoel
Copy link

@emnabarred Mine didn't work at first as well. But it worked after closing everything and reopening.

@anticdimi
Copy link

anticdimi commented Dec 26, 2020

I tried installing pyglet==1.5.11 and that fixed the ImportError, but now I get the following error: AttributeError: dlsym(0x104f43d80, class_getMethodImplementation_stret): symbol not found. Does anyone know what's this about, and/or how to fix it?
Btw, I'm running the code on MacbookPro M1.

@emnabarred
Copy link

@emnabarred Mine didn't work at first as well. But it worked after closing everything and reopening.

Unfortunately, it didn't work for me. I'm on the M1 chip if that has anything to do with this..

@anticdimi
Copy link

@emnabarred This pyglet/pyglet#335 should be the fix, at least it did the job for me :)

@emnabarred
Copy link

@antic11d Thank you very much, this fixed my issue !

@leon-richard
Copy link

I had the same problem, and installing pyglet==1.5.11 (as suggested in the discussion linked by @WayenVan) solved the issue.

Thanks you for saving my life!

@holoodst
Copy link

@DarioBernardo How can you install pyglet==1.5.11 when the newest version of gym (0.17.3) requires pyglet between 1.4 and 1.5 at least according to my error message:
gym 0.17.3 requires pyglet<=1.5.0,>=1.4.0, but you'll have pyglet 1.5.11 which is incompatible

sure ,but it is work amzing

@cmsax
Copy link

cmsax commented Feb 5, 2021

I just tried pyglet==1.5.11, not worked. but pyglet==1.5.12 worked. with gym==0.18.0

@DerekGrant
Copy link

I had the same problem, and installing pyglet==1.5.11 (as suggested in the discussion linked by @WayenVan) solved the issue.

Solved my problem,thx!

@PluteW
Copy link

PluteW commented Mar 16, 2021

Thanks! Installing pyglet==1.5.11 worked for me!

@OleksiyAnokhin
Copy link

OleksiyAnokhin commented Mar 16, 2021

pyglet==1.5.11 does not work on Windows for me

What did I also try?

ImportError:
Error occurred while running from pyglet.gl import *
HINT: make sure you have OpenGL install. On Ubuntu, you can run 'apt-get install python-opengl'.
If you're running on a server, you may need a virtual frame buffer; something like this should work:
'xvfb-run -s "-screen 0 1400x900x24" python <your_script.py>'

@XiaoyanQian
Copy link

I had the same problem, and installing pyglet==1.5.11 (as suggested in the discussion linked by @WayenVan) solved the issue.

Thank you so much. this helps to fix my issue

@JalexDooo
Copy link

Thx!!

@vj68
Copy link

vj68 commented May 8, 2021

Installing pyglet==1.5.11 did not work for me ,
This is with MacOS Big sure 11.3.1 and gym=='0.18.0'

@jankaifer
Copy link

After installing pyglet==15.11.1 I get:

zsh: segmentation fault  python gym_demo.py

koojongin added a commit to koojongin/nes-py that referenced this issue Jul 27, 2021
when use macos, version big sur
nes-py module is only running on pyglet>=1.5.1
openai/gym#2101
@jkterry1
Copy link
Collaborator

This should all be fixed, but if it is not please create new issues for individual porblems

@openai openai locked as resolved and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests