0

I've been successfully using Thonny with Pygame and Pygame Zero for a while. Work upgraded the PCs to 4.0.0 (Python 3.10.4) and now I get the following error:

import pgzrun ModuleNotFoundError: No module named 'pgzrun'

I upgraded Thonny on my own Mac and had exactly the same issue.

Thonny's plug-ins manager shows both Pygame and Pygame Zero to be installed.

On my Mac, I used pip3 to install both plug-ins and the same code successfully executed from IDLE and the Terminal.

Back in Thonny, I have tried changing the Python Executable to each of the available options but this does not help. I have also tried using Thonny's Pygame Zero mode, but this also reports that the module is missing.

Any help and advice to overcome the problem, but on Mac and Windows, would be very much appreciated.

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
wibbleface
  • 119
  • 14

1 Answers1

0

try using the previous version of python that was installed: Run => Select interpreter => Alternative Python 3 ...

Different versions of python installed would also mean different sets of installed libraries.

NewbieCody
  • 39
  • 6
  • Thank you. However, the PC is new so there aren’t any previous versions of Python installed. In addition, the IT Department are reluctant to install deprecated software. Upgrading Thonny on the Mac overwrote the previous version. I have tried changing the interpreter in Thonny but it makes no difference – wibbleface Sep 06 '22 at 07:22
  • In this case, are you allowed to do pip install again? – NewbieCody Sep 06 '22 at 07:32
  • I can probably get IT to do a PiP install. However, if the experience on my Mac is the same, it won’t affect the execution via Thonny – wibbleface Sep 06 '22 at 12:32
  • I've had some success, but it's not an ideal solution. The following steps apply to the Mac version, I have not had the opportunity to try this on Windows. - I have been using the Thonny installer - I deleted the Thonny app - Download and install IDLE - install Pygame Zero using PIP3 - install Thonny using PIP Thonny will now execute code which requires the PyGame Zero and PyGame. However, it is very unstable. Attempting to use the Plug-ins manager hangs the app. – wibbleface Sep 06 '22 at 19:36