Setting up Pygame in Pycharm

This section will show you how to make sure that Pygame is installed in the virtual environment for your project. You also should use the Graphic Template as a starting point.

Install Pygame To Your System

Installing Pygame.mp4

Use Pygame in PyCharm

If you add the line of code: import pygame and you get an error you can manually add Pygame to your project.

f you don't see Pygame in the list of installed packages in PyCharm you can add it your projects virtual environment.

  • In the File menu, go to Settings.

  • In the Settings Window, click on the Project tab, and then click on Project Interpreter.

If you don't see Pygame, in the list of Pakages, you will need to add it manually.

  • Click the + to the right of the installed packages and search for pygame.

  • Select pygame and click Install Package.

  • After the install is complete, you can use Pygame in your program.