<分区>
特别是当我从外部 python 文件运行它并使用 IDLE 或 Pycharm 运行它时..请帮助...但有时它在交互式 shell 中工作,然后发生一些事情并开始出现问题... .我只是输入
import pygame
x = pygame.init()
print(x)
C:\Python33\python.exe C:/Users/Home/Desktop/pygame.py Traceback (most recent call last): File "C:/Users/Home/Desktop/pygame.py", line 1, in import pygame File "C:\Users\Home\Desktop\pygame.py", line 2, in x = pygame.init() AttributeError: 'module' object has no attribute 'init'
Process finished with exit code 1.