-2

I'm trying to install pygame. I now need to type import pygame into the terminal, but then I get this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pygame'

How do I fix this?

  • Does this answer your question? [ImportError: No module named 'pygame'](https://stackoverflow.com/questions/18317521/importerror-no-module-named-pygame) – wovano Oct 22 '22 at 07:49

1 Answers1

0

You can try this out,

  1. Open Windows explorer
  2. go to the python/scripts folder, where you've saved it.
  3. Over there type cmd in the address bar and then a cmd window with the same directory will pop up
  4. Now you need to go and again install pygame by the following command:

C:\python34\scripts> python -m pip install pygame

  1. Now, the final step is to check it out in your favorite ide by the command.

    import pygame
    print (pygame.ver)
    

if it works you're good to go.

Rabbid76
  • 202,892
  • 27
  • 131
  • 174