Mac Install Instructions

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 12

Updated June 2019
Installation for Mac
A. Installing Python
1. Make sure your Mac OS is update to date, or at least at 10.9. Click on the Apple
Logo on the top-left corner of your screen, then click on “About this Mac” to
verify the system version.
If the system does not meet this requirement, go to “System Preferences”, then
Software Updates” to update.
2. Go to https://www.python.org/downloads/ and click on the Button “Download
Python 3.7.3” The download should start automatically.
3. Open the installer and you shall see the screen below, follow the red rectangles on
each screen to finish the installation with all default settings.
Updated June 2019
If a window pops up for Confirmation of the Agreements, click “Agree.”
Updated June 2019
Wait for the installation to finish, then exit the installer.
Updated June 2019
B. Installing PyCharm
1. Download Mac OS X of PyCharm from:
https://www.jetbrains.com/pycharm/download/#section=mac, select the
Community” version to download.
2. Click to run the installer and drag the “PyCharm.app” on the left to
“Applications” folder on the right. Wait for the auto-installation to finish.
3. Launch PyCharm from Launchpad and add it to your Dock by right clicking on
the icon and choosing Options, Keep in Dock. Running PyCharm for the first
time will ask you to configure the editor, follow the screens below to finish setup.
[Insert Screenshots Here]
- Import PyCharm Settings: “Do not import settings,” then “OK”.
- Select the user interface theme: Choose a theme that you like, then “OK”.
- Download and install additional plugins: No additional plugins are needed; we
can just click “OK”.
- Start a project in PyCharm: “Create New Project”. Then go to section C.
Updated June 2019
C. Configuring PyCharm to work with Python and Pygame
1. Choose “Pure Python,” then select a desired location for your projects, and give it
a name such as “TestSetup” in the last tag. (the example directory below is
“PycharmProjects/TestSetup”, in which the project name(folder) is separated by a
‘/’ from the parent directory)
2. Click on “PyCharm” on the top-left menu bar, then click “Preferences”
3. On the left navigation panel, go to Project: [YourProjectName] and expand it,
select “Project Interpreter”. (See screen below)
Verify the Project Interpreter to be Python 3.7: if not, click on the upper rectangle
area to open the drop-down menu, if no Python 3.7 is available, then click “Show
All…”
Updated June 2019
Click “+” button to add a new Interpreter.
On the left Navigation panel, click on “System Interpreter”, then click the
interpreter input box to open the drop-down menu, look for Python 3.7 options,
which is usually located as “/usr/local/bin/python3.7
If there is no option of python 3.7, click on the “” on the right end of
“Interpreter” and find the python3.7 file in the following directory:
“/usr/local/bin/python3.7”, then click “OK”.
Then click “OK” again on the “Add Python Interpreter” screen.
Updated June 2019
4. Now we are back to Preference screen under “Project Interpreter” section.
Click “+” button to add a new package to the project.
Search for pygame and click “Install Package” on the package with the exact
name.
It will say “Package ‘pygame’ installed successfully”, then we can close the
window.
Updated June 2019
Back to Preference screen, now click “OK”. Wait for the process to finish on the
bottom progress bar.
5. Create a new Python file in the project by right-clicking the root(upper-most)
folder, then “New”, “Python File”.
Give your new python file a name:
6. On the top-right corner, click on “Add Configuration” button.
Click “+” to add a new configuration on the top-left corner of the new screen.
Select “Python” in the window under the “+” button after clicking on it.
Updated June 2019
Give your configuration a name, such as “TestConfiguration”; then click on the
Folder Icon on the right end of Script path, select the python file that we just
created.
Next verify the python interpreter is “Python 3.7”: if not, open the drop-down
menu by clicking the triangle on the right (follow the pink arrow), and select
Python 3.7. (If no Python 3.7 interpreter is available, refer to step 4)
7. Now all the setup part is done, let’s test out Python and Pygame works with a
short script!
Put the following code (you can copy and paste) into the python file we created
earlier (TestPython.py in my example).
import pygame
print('Hello World!')
Go to the top-right corner, we can run our Configuration by clicking the green
Triangle next to the Configuration name.
Updated June 2019
Check the bottom left-corner, if your program runs and print message from
Pygame and “Hello World”, then you are all set!
(More on next page)
Updated June 2019
D. Checking out project code from GitHub repo
1. Open PyCharm, at the startup window, select “Check out from Version
Control”, then select “Git” from the dropdown menu that pops up.
2. Copy and paste “git@github.com:RHIT-CSSE/catapult.git” into the URL box
and click “Clone”. Wait for the process to finish.
3. Click “Yes” when the Checkout From Version Control window shows up to open
the folder that we just cloned(downloaded).
4. Click on “PyCharm” on the top-left menu bar, then click “Preferences”
Updated June 2019
5. On the left navigation panel, go to “Project: catapult” and expand it, select
“Project Interpreter”. (See screen below)
Verify the Project Interpreter to be Python 3.7: if not, click on the upper rectangle
area to open the drop-down menu; if no Python 3.7 is available, go to step 3 in
section C.
Then click “OK”.
6. Create a folder to keep your own files in the root folder of “catapult” by right-
clicking catapult on the upper-left corner in the Project Browser, “New”,
“Directory”. Give it your favorite name and create new python files or project
folders in there for the future!
Now sit back and relax while waiting for other people to finish. Feel free to play around
with more python commands as well!
Page 1 of 12 - Mac Install Instructions
Page 2 of 12 - Mac Install Instructions
Page 3 of 12 - Mac Install Instructions
Page 4 of 12 - Mac Install Instructions
Page 5 of 12 - Mac Install Instructions
Page 6 of 12 - Mac Install Instructions
Page 7 of 12 - Mac Install Instructions
Page 8 of 12 - Mac Install Instructions
Page 9 of 12 - Mac Install Instructions
Page 10 of 12 - Mac Install Instructions
Page 11 of 12 - Mac Install Instructions
Page 12 of 12 - Mac Install Instructions

Navigation menu