ModuleNotFoundError:没有名为“pygame"的模块 [英] ModuleNotFoundError: No module named 'pygame'

查看:114
本文介绍了ModuleNotFoundError:没有名为“pygame"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 32 位的 python 3.7,在我做了 pip install pygame 之后,我仍然得到

I have python 3.7 with 32bit and after I did pip install pygame, I'm still getting

ModuleNotFoundError: 没有名为pygame"的模块

ModuleNotFoundError: No module named 'pygame'

运行我的代码时.我正在使用 pycharm.

when running my code. I'm using pycharm.

推荐答案

我只想补充第一个答案所说的内容:如果您使用的是 pycharm,它仍然无法工作,直到您转到文件 >>设置 >>>>[您的项目名称] >>蟒蛇解释器.您将在那里看到软件包列表.如果pygame在它上面,那很好,否则,你必须双击包所在的字段.它会引导您进入一个小弹出框,您可以在其中输入内容.如果您输入 pygame,您应该能够安装该软件包.

I would just like to add to what the first answer is saying: If you are using pycharm, it still won't work until you go to file >> settings >> >> [your project name] >> python interpreter. You will see a list of packages there. If pygame is on it, then good, else, you must double click on the field where the packages are. It leads you to a little pop up box where you can type in things. If you type in pygame, you should be able to install the package.

这篇关于ModuleNotFoundError:没有名为“pygame"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆