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

Run without creating pygame window? #26

Closed
zergylord opened this issue Feb 19, 2017 · 4 comments
Closed

Run without creating pygame window? #26

zergylord opened this issue Feb 19, 2017 · 4 comments

Comments

@zergylord
Copy link

I know PLE has an argument to run without updating the screen, but the screen window is created regardless, which seems odd. I'm trying to run simulations on headless servers, but because of this bug I can't. Is there a work-around that I'm missing?

@wooridle
Copy link

wooridle commented Mar 27, 2017

I also experienced the same problem when running code in the Google cloud. I solved the problem this way. Add the following code to your code
os.putenv('SDL_VIDEODRIVER', 'fbcon')
os.environ["SDL_VIDEODRIVER"] = "dummy"
link : http://www.pygame.org/wiki/HeadlessNoWindowsNeeded

@ntasfi
Copy link
Owner

ntasfi commented Mar 27, 2017

Thanks @wooridle!

@ntasfi
Copy link
Owner

ntasfi commented Mar 28, 2017

Added to the readme, thanks again!

@icoxfog417
Copy link

I think os.environ["SDL_VIDEODRIVER"] = "dummy" is enough to do it.

http://www.pygame.org/wiki/HeadlessNoWindowsNeeded

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

4 participants