Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

Python I'm not sure what this means and if pygame has been installed successfully.

User8574

Active Coder
(Visual Studio) I installed the newest version of pygame but I'm not sure if it was installed properly. Anyone know? Thanks a lot.
 

Attachments

  • Screenshot 2022-08-20 155933.png
    Screenshot 2022-08-20 155933.png
    26.6 KB · Views: 4
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.
 
Last edited:
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.
This command doesn't work: it gives me this:
Code:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings.
I am on windows btw.
 
I typed 'pip install pygame' in the terminal, then when I type 'import pygame' in python it just doesn't do anything :/

The init thing doesn't work either; spits out an AttributeError.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom