python 3.x - Pygame import error -
i using pygame 1.9.2pre python3. when run idle3 , type
>>> import pygame >>> pygame.init() this works when write these 2 lines in .py file , run in idle3 (by opening , hitting f5) messege
traceback (most recent call last): file "/home/nabeel/devalopment/python/pygame.py", line 6, in <module> import pygame file "/home/nabeel/devalopment/python/pygame.py", line 9, in <module> pygame.init() attributeerror: 'module' object has no attribute 'init'
name file different pygame.py otherwise program default importing own file , not want since want other module.
you can use print(pygame.__path__) check getting pygame module , in case point directory in.
Comments
Post a Comment