-1

I really need help with installing pygame into PyCharm 2020.2... I have done well in turtle and now I want to move on to pygame, but when I do import pygame, it says that there is no such module.

I know that the reason is that I need to install the module into PyCharm, but I don't know how and no tutorial out there works or is up to date.

Long question short, how do you install the module 'Pygame' into PyCharm 2020.2?

Duck Duck
  • 157
  • 6
  • See [*"How to select Python version in PyCharm?"*](https://stackoverflow.com/q/10322424) and also [*"Installing specific package versions with pip"*](https://stackoverflow.com/q/5226311). – bad_coder Nov 22 '20 at 04:34

2 Answers2

2

You don't install libraries into IDEs like Pycharm. They're installed for Python, so it will work in any editor/IDE you use. I'd recommend setting up a virtual environment when working on a project.

Packages are installed via pip with Python via the command line or terminal.

Typing pip install pygame should get it all installed and then you'll be able to import it.

MiConnell
  • 71
  • 2
0

first, have you installed pip when installing python? if you have not, check this video: https://www.youtube.com/watch?v=Ko9b_vC6XY0 now, just go to the terminal in pycharm, by pressing this area in the bottom of your screen: image

then type pip install pygame

pert
  • 47
  • 7