User avatar
PolarBear123
Posts: 48
Joined: Sat Sep 09, 2017 1:26 am
Location: Westchester County, NY, USA

Running Pygame Zero in Thonny

Sun Jan 06, 2019 9:35 pm

Hello! Is it possible to run a game in Python using Pygame Zero in the Thonny Python IDE?
When I do:

Code: Select all

import pgzrun
...
pgzrun.go()
it gives me an import error, you can't run this code from an interactive interpreter.
Raspberry Pi's are cool and so are Polar Bears!

User avatar
bensimmo
Posts: 3971
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Running Pygame Zero in Thonny

Sun Jan 06, 2019 9:53 pm

That's what we get too.
So we use IDLE3 or Mu. (Both on the Pi)

scotty101
Posts: 3583
Joined: Fri Jun 08, 2012 6:03 pm

Re: Running Pygame Zero in Thonny

Sat Apr 27, 2019 9:20 pm

Anyone know anything more about this?

PyGame Zero works fine on my Pi in Thonny but not on the Pi's used at the Code Club I volunteer at.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
bensimmo
Posts: 3971
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Running Pygame Zero in Thonny

Sun Apr 28, 2019 2:04 pm

Version of pygame, version of Thonny?
(I think it has pygame zero mode now, not needed if you have the import iirc.)
my does pygame zero too.?

But what problem are you seeing ?

But I think it will be the version of Thonny, it needs updating (it didn't used to work)

Return to “Python”