Skip to content Skip to sidebar Skip to footer

How To Fix Importerror: No Module Named Pygame

I was trying to import pygames from python using Canopy firstly and after no success I tried from terminal and in both cases I get: import pygame Traceback (most recent ca

Solution 1:

Try searching pygame in synaptic package manager. Install it from there.

Solution 2:

I remember pygame giving me a few hours of pain when I installed it on OSX a few months back.

You should be stating which operating system you are on, seeing as this is an installation problem. It looks like you are on a bash shell, so I'm guessing Linux.

which python and which python3 will give the respective paths. Your OS typically needs both 2 and 3.

There will be a corresponding pip and pip3

You've crossed your wires by using pip3.

Maybe you can install pygame using pip... the Python Package Installer?

Googling 'pip pygame' gives https://askubuntu.com/questions/312767/installing-pygame-with-pip

Post a Comment for "How To Fix Importerror: No Module Named Pygame"