0

I have read some of the Stack Overflow posts here about pygame not importing. I have tried moving pygame in the scripts folder of Python, making sure it is the right type, and installing it using anaconda prompt. Do you know why none of these are working? By the way, here's my code and error. I have Windows 10, 64 bit computer, and Python 2.7.

import sys, os, random, pygame

ImportError: No module named pygame

skrx
  • 19,980
  • 5
  • 34
  • 48
jay a
  • 624
  • 2
  • 7
  • 11

2 Answers2

0

make sure you installed the library in same python version where you are coding. if you don't know how to do that type this in python code and run it

import pip
pip.main(["install","pygame"])

if it does not work too you should probably upgrade python to 3.10

-2

some users arent run pygame command.after showing requirement message.if you download pygame copy that 2 folder named as"pygame"and"pygame-1.9.4.dist-info"socopy this folder to your"C:\Program Files (x86)\Python37-32\Lib" seriously after that u r DONE!!!!!!!!