3

Every time I try to run some code with a .png file or .jpg file in Thonny, I get an error:

pygame.error: File is not a Windows BMP file

I tried installing Pygame again with the Unix Debian version (sudo apt-get install python3-pygame), because I think that's what TwisterOS is based on, but I get the message that I am already on the latest version. When I then try to run the test to see if Pygame is correctly installed:

python3 -m pygame.examples.aliens

I get this message: Sorry, extended image module required

So that's why I came to the conclusion that something is missing with my image module of Pygame. Which makes sense, because Pygame can only run .bmp files for now. Every time when I have converted images to a .bmp, the code works.

How can I get the extended image module of pygame installed?

I am completely new when it comes to using Linux, Raspian or Debian. So even with installing or uninstalling I need some instructions. I am running this on a Raspberry Pi 400.

If you need any more info, let me know. Thanks in advance!

FunkyPoop
  • 31
  • 2
  • 1
    Right, so it looks like the PyGame package for TwisterOS is not compiled with proper image support (report it as a failure). You will have to investigate installing PyGame via `pip3`, or find a better package. Please see: https://www.pygame.org/wiki/GettingStarted – Kingsley Dec 02 '20 at 00:39
  • 1
    I did not know that different OS'es had different packages of programs. I thought there was one big database with all the apps for Linux or something like that. But because of your comment, I tried the code on Raspian and it worked straight away. So that's what I'll use from now on. – FunkyPoop Dec 03 '20 at 09:16

0 Answers0