By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!>>> import pygame
pygame 2.1.2 (SDL 2.0.16, Python 3.10.4)
Hello from the pygame community. https://www.pygame.org/contribute.html
import pygame as pg
pg.init()
screen = pg.display.set_mode((400,400))
running = True
while running:
for event in pg.event.get():
if event.type == pg.QUIT:
running = False
pg.display.flip()
This command doesn't work: it gives me this:I've not used visual studio. I use atom but,
if pygame is installed, you should get something like
Code:>>> import pygame pygame 2.1.2 (SDL 2.0.16, Python 3.10.4) Hello from the pygame community. https://www.pygame.org/contribute.html
Does this run on your box?
Python:import pygame as pg pg.init() screen = pg.display.set_mode((400,400)) running = True while running: for event in pg.event.get(): if event.type == pg.QUIT: running = False pg.display.flip()
When I install a module I usually do python3 -m pip install module. This ensures I'm installing to the right version of python.
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings.
I am on 3.10.3In the cmd terminal when you start python, what version displays?
This doesn't work.If you are using python version 3.10 it may be py -m pip install module. That is what I have to use on my windows box
On PyCharm it gives me a ModuleNotFoundError.I think I installed it, it just doesn't work in anything other than IDLE or the command prompt... How do I make it work on visual studio or any other decent IDE?
Code Forum is a community platform where coding enthusiasts can connect with other developers, engage in discussions, ask for help, and share their knowledge with a supportive community. It's a perfect place to improve your coding skills and to find a community of like-minded individuals who share your passion for coding.
We use essential cookies to make this site work, and optional cookies to enhance your experience.