I'm new to Python, and I'm trying to get started with Pygame.
When I run this code:
import pygame
pygame.init()
I get this error:
Traceback (most recent call last):
File "C:\Users\Jason\PycharmProjects\Game\myapp.py", line 6, in <module>
pygame.init()
AttributeError: 'module' object has no attribute 'init'
But when I try to see if I accidentally imported another file:
import pygame
import inspect
# Initialize the game engine
print(inspect.getfile(pygame))
pygame.init()
I get this weird error:
Traceback (most recent call last):
File "C:\Users\Jason\PycharmProjects\Game\myapp.py", line 5, in <module>
print(inspect.getfile(pygame))
File "C:\Python34\lib\inspect.py", line 518, in getfile
raise TypeError('{!r} is a built-in module'.format(object))
TypeError: <module 'pygame' (namespace)> is a built-in module
How can I import the right Pygame?
I'm using 3.4 on Windows 7 and Pygame 1.9.2a0 (for 3.2) in C:/Python34.
Thank you