简体   繁体   English

Pycharame模块上的Pycharm IDE问题/问题

[英]Pycharm IDE issue/problem on pygame module

Pygame does not work in Pycharm despite everything works at python IDLE. Pygame在Pycharm中不起作用,尽管一切都在python IDLE上运行。 It says: 它说:

AttributeError: module 'pygame' has no attribute 'init' AttributeError:模块'pygame'没有属性'init'

Even though the given information is not enough for properly answering this question, I can tell you a one cause for this error from my personal experience. 即使给定的信息不足以正确回答这个问题,我也可以从个人经验告诉你这个错误的一个原因。

Most probably you have named your source file as pygame.py or you have a directory named pygame somewhere in your path. 很可能你已经将源文件命名为pygame.py或者你的路径中有一个名为pygame的目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM