NoValueTY
NoValueTY

Reputation: 9

Python: Having trouble getting pygame to work. on PC

When I use this from a tutorial.

import pygame

pygame.init()


black    = (   0,   0,   0)
white    = ( 255, 255, 255)
green    = (   0, 255,   0)
red      = ( 255,   0,   0)


size=[700,500]
screen=pygame.display.set_mode(size)

pygame.display.set_caption("jons cool game")

I get this error:

Traceback (most recent call last):
  File "C:\Users\Jonathan\Desktop\Pygame\Example.py", line 2, in <module>
    import pygame
ImportError: No module named 'pygame'

I'm using v3.3.1 and pygame 3.3.

Upvotes: 0

Views: 119

Answers (2)

Alex
Alex

Reputation: 1116

According to the ImportError you do not have pygame installed with Python 3.3.

On the pygame's website there is no 3.3 version. I would suggest to use Python 3.2 and download the corresponding pygame version from pygame.org

Upvotes: 3

njl
njl

Reputation: 57

Might be a problem with your pygame installation. Check the documentation and tutorials on the website to make sure you set it up correctly.

Upvotes: 1

Related Questions