Hello

Need help. I try to insert a background sound in my program but I get ImportError message

Below line 8 and 9 of my program

import random, time, pygame, sys
from pygame.locals import *

Below the error message when running my program

C:\Users\user pc\AppData\Local\Programs\Python\Python35-32\python "C:\Users\user pc\SkyDrive\ISN\son essaie.py"
Process started >>>
Traceback (most recent call last):
File "C:\Users\user pc\SkyDrive\ISN\son essaie.py", line 8, in <module>
from pygame.locals import *
ImportError: No module named 'pygame'
<<< Process finished. (Exit code 1)

================ READY ================

Well, you clearly don't have pygame.

Open a command line.

CD AppData\Local\Programs\Python\Python35-32
pip install pygame
exit

Try again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.