Sep 21, 2018 By Team YoungWonks
In this blog, we shall look at the procedure to install PyGame on a Mac OS (Operating System). Now PyGame is cross-platform set of modules in the Python programming language. These modules are designed for writing video games. Thus PyGame includes computer graphics and sound libraries that have been created to be used with the Python programming language.
Now how do we do install PyGame on a Mac? Let us start by looking at how one can install Python on a Mac.
The video below tells you how to do so...
Now that we have installed Python on the Mac, we can go on to install PyGame.
Installation of PyGame on Mac:
- Start by opening Spotlight search bar on your Mac. You can do this by taking your cursor to the top right corner of your desktop and clicking on the magnifying glass icon.
- Once you have opened the Spotlight search bar, type terminal in the bar to open terminal.
- Now type pip3.
- If you see a bunch of general options on the screen, it means that pip is already installed on your MacBook.
- Now type pip3 install pygame as shown in this (below) image.
- The installation will start at this point and you need to wait till the PyGame installation is done. You’ll know it’s done when you see a message (as shown below) saying successfully installed pygame.
- To test if PyGame has been installed on your Mac, open IDLE by typing IDLE in your Spotlight search bar.
- Then type import pygame as shown in the image.
- If you do not see any error, it means that PyGame has been successfully installed on your Mac.
Shared below is a video explaining how one can install PyGame on one's Mac: