Skip to content Skip to sidebar Skip to footer

Problem To Install Pygame On Ubuntu 20.04lts

I am on Ubuntu 20.04LTS, and I try to install pygame (for python) for a school project. But when I try this: sudo pip3 install pygame I received an error: ERROR: Command errored o

Solution 1:

Try installing it with

sudo apt install python3-pygame

instead. The error you are getting is because you are missing the Pygame dependencies, which apt should install for you.

As a general rule, it’s a good idea to install Python packages through the package manager, and use pip only if they’re unavailable there.

Solution 2:

Try install like this:

python3 -m pip install pygame==1.9.5rc2

I was having same problem and it worked very well.

Post a Comment for "Problem To Install Pygame On Ubuntu 20.04lts"