Ask coding questions

← Back to all posts
Pygame: Package operation failed.
JasonBWilson (6)

Trying to import pygame and get error:

" Package operation failed."

After selecting Pygame from the packages and hitting the +, the install starts to run, but ends with:

"Hunting dependencies...
WARNING: "sdl-config" failed!
Unable to run "sdl-config". Please makesure a development version of SD
L is installed.


ERROR: Command errored out with exit status1: python egg_info Chec
k the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.0.2 is availab
You should consider upgrading via the 'pip install --upgrade pip' command.

add [-D|--dev] [--path PATH] [--optional] [--platform PLATFORM] [--dry-run] <name> (<name>)...

exit status 1 Package operation failed.

AdCharity (1322)

You need a pygame repl so that a pygame window displays (otherwise you either can't import the package and you'll get failed to load display errors)

chloehylee (0)

@AdCharity Even when I do it it still doesn't work? I've tried running other people's pygames but it also gives the error.

AdCharity (1322)

@chloehylee is this from github? I've noticed a similar error. Report it on /bugs :(