Installing PyGame on a Mac OS
This blog will tell you how you can install PyGame on a Mac OS
RE: how do I install pygame for python 3.9 for mac? By Bertramjeffreylora - 7 hours ago. When installing it I would make sure you are first running python 3 in your terminal or command line before. Install Python3 'proper' and packages we’ll need for installing PyGame from bitbucket: brew install python3 hg sdl sdlimage sdlmixer sdlttf portmidi Install PyGame.
Sep 21, 2018 By Team YoungWonks
- Hey guys, in this video I explain how to download and install pygame on a mac osx computer. This is extremely simple and fast and should not take you more th.
- Pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games. Pygame.org (the website) welcomes all Python game, art, music, sound, video and multimedia projects. Once you have finished getting started you could add a new project or learn about pygame by reading the docs.
- Set of Python modules designed for writing video games. Pygame is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. Like SDL, pygame is highly portable and runs on.
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:
This blog is presented to you by YoungWonks. The leading coding program for kids and teens.
YoungWonks offers instructor led one-on-one online classes and in-person classes with 4:1 student teacher ratio.Sign up for a free trial class by filling out the form below:
Latest Posts
Here is a quick tutorial on how to get Pygame up and running with Python 3 on a Mac with OS X 10.6.
Rationale
The Pygame download site presently has packages for Python 2.4, 2.5, 2.6 and 2.7 for OS X, but none for Python 3 (3.2 to be precise). This is odd, as everyone is doing Python 3 development these days, don't you think? And there even is an installer for Python 3 on MS Windows. So, let's change that and get Pygame working with Python 3 under OS X.
Prerequisites
Make sure the thing in front of you is an Apple computer with an OS X operation system. I my case it was a MacBook Pro with OS X 10.6.6 'Snow Leopard'.
You will need XCode, the Apple developer toolset. For OS X 10.6 'Snow Leopard', you will find it on the installation DVD under 'Optional Packages' or similar. For OS X 10.7 'Lion' you can download XCode for free in Apple's App Store.
To learn about your computer's operating system version, click the apple symbol in the top left and select the first menu item 'About This Mac'.
Get A Package Manager
Next, get a decent package manager to be able to conveniently install dependencies. I used Homebrew, and so should you. In the Finder, go to Applications -> Utilities and start the Terminal. To install Homebrew, type
and hit Return.
Pip Install Pygame Mac
Install Python 3
Homebrew has a recipe for Python 3, which we are going to use. Type
and hit Return. Once that is done, verify the Python version by typing
Install Pygame
The following is taken from a Pygame Issue Tracker thread.
First install the Mercurial version control system:
Then do the same for the git version control system, which is needed by a dependency package:
Now install all the dependencies of Pygame:
Almost there! To install Pygame now, we will use pip. Go and get it by running:
And now, finally:
Pygame Download For Mac
After this is done, verify that it is working:
That's it! Now you have Pygame for Python 3 installed and working and can start hacking.