pycharm 未检测到包 Pygame [英] Package Pygame Is Not detected by pycharm

查看:69
本文介绍了pycharm 未检测到包 Pygame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下命令安装了 pygame-

I installed pygame by using the following command-

pip install pygame

但是当我尝试在 pycharm 上的项目中导入 pygame 时,它​​显示我找不到模块 pygame 的错误.但它在 Python IDLE 中运行良好.请帮助我并提前致谢!

But when I tried to import pygame in a project on pycharm it shows me error that the module pygame is not found. But it works fine in Python IDLE. Please help me and thanks in advance!

推荐答案

您可能需要安装 pygame 包.

You may need to install the pygame package.

  1. 转到文件
  2. 设置
  3. 转到 Python 解释器
  4. 点击加号图标并搜索 pygame
  5. 选择 pygame 并点击安装包".

这篇关于pycharm 未检测到包 Pygame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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