ICS H32 Fall 2024
Project 0B: Square One
Installation and Configuration on macOS
Introduction
This document explains how to install the ICS H32 development environment on a machine running macOS. You'll need to be sure you pay attention to small details as you follow through them.
Step 1: Show file name extensions
The first step is not to install a software package at all, but to be sure you've configured a macOS setting so that it's not set in a way that's fine for everyday users, but very troublesome for those of us who write programs or do other serious work. When macOS displays its filenames, it can sometimes hide the "file name extension" (i.e., the part of the filename that follows the last dot), so that a file named alex.txt
will simply have its name displayed as alex
instead, with an icon used to visually differentiate one "type" of file from another.
This default is fine for casual users, but is certain to cause us problems in this course — and routinely causes my students problems in courses where there is programming involved — so everyone needs to turn this off, which is easy to do.
Seriously! Do this! You'll be very glad you did; as a programmer, filenames and their extensions are often relevant to the work you're doing, so it's important to see filenames as they are.
Step 2: Download and installing Python
If you've taken previous coursework in Python, you may already have a version of Python installed on your machine, but it will be important that you use the right version in this course. As of this writing, the latest release of Python 3.12 is Python 3.12.6 macOS 64-bit universal2 installer, which is available at the following link.
Before you run this, it's not a bad idea to uninstall any other version you already have installed. While different versions of Python can safely coexist on a system in some cases, they do cause some confusion, so if you don't have a specific reason to maintain multiple versions, it's easiest to keep just one. You can uninstall Python just as you would any other macOS application.
When you run this, the installer's defaults are all reasonable, so there's nothing that needs configure. Proceed through the installer's screens, accepting licenses and other default settings.
At the conclusion of the installation, it's a good idea to follow the advice on the last screen: Opening the Finder window, navigating to Applications and then Python 3.12, and double-clicking on the Install Certificates icon (which will be named Install Certificates.command if you're no longer hiding file name extensions) to install a set of root certificates that will allow Python 3.12 to use HTTPS to communicate with web sites and web services.
When you're done, you can feel free to delete the Python installer you downloaded; you won't need it again.
Testing your Python installation
Some of you may never have used a Terminal window in macOS before, but we'll occasionally have use for it in this course. There are a variety of ways to do it on macOS and any of them will do; a quick Google search should reveal at least one way to do it. Once you've brought up a Terminal window, type the command python3.12
at the prompt and hit the Return key. You should see something more or less like this show up in the Terminal window as a result:
Python 3.12.6 (v3.12.6:a4a2d2b0d85, Sep 6 2024, 16:08:03) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
If so, type quit() and press Enter to stop the interpreter, then close the Command Prompt window; you're good to go and are ready to launch IDLE!
If you see a different version, that means you have another version of Python installed instead of the one linked above. (Don't worry too much about the date or the funny-looking "a4a2d2b0d85" numbering; as long as you see "3.12.6", you're where you need to be.) If, instead, you see an error message similar to this one:
python3.12: Command not found.
then your installation was not successful. Seek assistance from your classmates who have successfully installed Python 3.12.6.
Starting IDLE
Lastly, you'll want to be sure that you try starting IDLE and verify that it, too, is running the right version of Python. The easiest way to launch IDLE is to open Applications, then choose Python 3.12, then choose IDLE.app. You might also like to dock IDLE on the desktop menu bar, since you'll be using it often.
Once you start IDLE, you should see a window pop up, in which will appear the same message you saw when you started Python from the Terminal:
Python 3.12.6 (v3.12.6:a4a2d2b0d85, Sep 6 2024, 16:08:03) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
If so, you're ready to roll!
Congratulations!
Nice work! You should now be ready to proceed with your work this quarter. Additional installation guidance will be given as we need additional tools, but this will be sufficient to get started.