刘刘很强 发表于 2020-6-12 15:19:05

pygame导入成功却运行失败?

idle交互模式输入import pygame显示pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html应该是导入成功 吧
然后我编辑器输入import pygame

pygame.init()显示Traceback (most recent call last):
File "D:\刘明\BianCheng\pycharm\源代码\测试.py", line 1, in <module>
    import pygame
File "D:\刘明\BianCheng\pycharm\源代码\pygame.py", line 3, in <module>
    pygame.init()
AttributeError: partially initialized module 'pygame' has no attribute 'init' (most likely due to a circular import)
求解,谢谢

刘刘很强 发表于 2020-6-12 16:24:08

解决了 是中文路径的问题

Twilight6 发表于 2020-6-13 07:37:52

审核太久没通过,自己解决了问题{:10_250:}
页: [1]
查看完整版本: pygame导入成功却运行失败?