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

Sorry, extended image module required #1250

Closed
HouWan opened this issue Aug 15, 2019 · 6 comments
Closed

Sorry, extended image module required #1250

HouWan opened this issue Aug 15, 2019 · 6 comments
Assignees

Comments

@HouWan
Copy link

HouWan commented Aug 15, 2019

My Info:

system: macOS Mojava 10.14.5
python: python 3.7.3

and I install pygame:

pip install https://github.com/pygame/pygame/archive/master.zip

Then terminal:

>> python3 -m pygame.examples.aliens
pygame 2.0.0.dev3 (SDL 2.0.9, python 3.7.3)
Hello from the pygame community. https://www.pygame.org/contribute.html
Sorry, extended image module required

The problem with my program is:
Sorry, extended image module required

What should I do?

@HouWan
Copy link
Author

HouWan commented Aug 15, 2019

Before, I used

sudo pip3 install pygame

to install pygame.

but, the problem becomes:
The windows created by pygame are blank,No image

like this:
WX20190815-1123

@markph0204
Copy link
Contributor

markph0204 commented Sep 8, 2019

Tests to validate same:

  • master (aka pygame-2.0.0.dev3) | SDL2.0.10 | Mac 10.13.6 | py3.7.4 - NO ISSUE
  • master (aka pygame-2.0.0.dev3) | SDL2.0.10 | Mac 10.14.5 | py3.7.3 - NO ISSUE

The error is coming from here

#see if we can load more than standard BMP
if not pygame.image.get_extended():
    raise SystemExit("Sorry, extended image module required")

Can you share what SDL2 packages you've installed? For example I have:

sdl2
sdl2_gfx
sdl2_image
sdl2_mixer
sdl2_net
sdl2_ttf

@markph0204 markph0204 self-assigned this Sep 8, 2019
@HouWan
Copy link
Author

HouWan commented Oct 28, 2019

I installed SDL as follows:

brew list | grep sdl

Result:

sdl
sdl2
sdl2_image
sdl2_mixer
sdl2_ttf

SDL Details are as follows:

sdl: stable 1.2.15 (bottled), HEAD
/usr/local/Cellar/sdl/1.2.15_1 (225 files, 1.4MB)

sdl2: stable 2.0.10 (bottled), HEAD
/usr/local/Cellar/sdl2/2.0.10 (87 files, 4.6MB)

sdl2_image: stable 2.0.5 (bottled)
/usr/local/Cellar/sdl2_image/2.0.5 (10 files, 285.0KB)
Build: pkg-config ✘
Required: jpeg ✔, libpng ✔, libtiff ✔, sdl2 ✔, webp ✔

sdl2_mixer: stable 2.0.4 (bottled), HEAD
/usr/local/Cellar/sdl2_mixer/2.0.4 (10 files, 313.9KB)
Build: pkg-config ✘
Required: libmodplug ✔, libvorbis ✔, sdl2 ✔

sdl2_ttf: stable 2.0.15 (bottled)
/usr/local/Cellar/sdl2_ttf/2.0.15 (10 files, 78.9KB)
Build: pkg-config ✘
Required: freetype ✔, sdl2 ✔

My pygame version is 1.9.6 ;Python is 3.7.3.
I am on the Mac,running the pygame program always gets a blank page.
But the same program, I am running fine on Ubuntu.

@illume
Copy link
Member

illume commented Oct 28, 2019

I'm not sure what the problem is with building from source. Maybe you need to:

brew install pkg-config

However, you can also try the pre-release binary wheels like this:

python3 -m pip install pygame==2.0.0.dev6

@HouWan
Copy link
Author

HouWan commented Oct 29, 2019

@illume @markph0204
Thank you very much, I solved this problem, follow your method:

one step:

brew install pkg-config

two step:

python3 -m pip install pygame==2.0.0.dev6 --user

Here is a summary of the problem, and may help others who have encountered this problem.

On Mac, when you use pygame, you encounter the following problems:

  • show error: Sorry, extended image module required
  • always show gets a blank windows, no image

You can try the following:

1.check your SDL2 packages
eg:
brew list
brew install SDL2_xxxx

2.check your pygame version
eg:
python3 -m pip install pygame==2.0.0.dev6 --user

@HouWan HouWan closed this as completed Oct 29, 2019
@ghost
Copy link

ghost commented Aug 11, 2020

Thank you so much for this answer HouWan! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants