Skip to content
Advertisement

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:

JavaScript

I received an error:

JavaScript

Can you help me, please?

Advertisement

Answer

Try installing it with

JavaScript

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.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement