pygame模块使用时出现AttributeError: module 'pygame' has no attribute 'init'错误解决方法

pygame模块使用时出现AttributeError: module ‘pygame’ has no attribute '…'错误解决方法

首先在pygame中存在init()模块,出现这样的问题是你的python文件名起的不对,将文件名改过来即可。
在这里插入图片描述
注:检查文件名是否为pygame.py不可以跟pygame模块同名。

发布了45 篇原创文章 · 获赞 15 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/CHQC388/article/details/104237198
今日推荐