Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pygame on Ubuntu Python 3

I have searched everywhere. There is no answer for my specific problem! I have Ubuntu, I want to use pygame on Python 3. I installed the pygame package with

sudo apt-get python-pygame

but it just doesn't work when I type

import pygame    

Please help!

like image 750
Lozdyck Avatar asked Oct 31 '25 09:10

Lozdyck


1 Answers

You must install pip for python3

$ sudo apt install python3-pip

and then, with the pip installed, install pygame

$ pip3 install pygame
like image 88
Myck Avatar answered Nov 02 '25 00:11

Myck



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!