These instructions also exist with alternate formatting on the Learn platform. If the formatting there is easier to read, feel free to follow the instructions on Learn in the "Precourse" unit under the "Getting Ready" topic; the lesson is titled "Installfest - Getting Software Installed".
Installfest Overview
It's important to ensure that everyone has all the right tools, with compatible versions, so we can successfully begin programming along with the Ada curriculum.
Many students will have some set of the required tools installed already, but be sure to read through all of these instructions to make sure they are compatible. If any of these instructions are unclear, try asking for help in Slack (after it's been installed).
Note that many of these tools are under regular development, and may have newer versions than are listed here. Generally, any version the same or newer than what is mentioned in the instructions will be fine, but be sure to ask in Slack if there is any uncertainty about the correct versions of the required software.
Follow the steps below, typing any necessary commands into the Terminal application, which can be found in Finder under Applications > Utilities > Terminal.
After finishing, keep an eye on Slack for anyone else asking for help, and share your experiences!
Installing Xcode Command-line Developer tools
Apple provides a set of UNIX-style development tools on the command-line. To install them, go to Terminal and enter:
$ xcode-select --install
NOTE: '$' Indicates the Terminal Prompt
When following instructions that involve typing terminal commands, the prompt is often indicated with a character like $ or %. These characters should not be typed in.
There are a variety of programs that we'll encounter as developers. Many are run through the terminal, and some present their own prompts. By labelling the commands with a representative prompt, instructions can make it more clear where the command should be entered.
For now, we should focus on getting used to seeing the prompt character, and being careful not to type it in or copy-pasting it. If we accidentally include the prompt character in the commands we input, an error such as zsh: command not found: $ will be displayed.
Once you press enter on the command above, you will be prompted to allow the Xcode command line developer tools to install as in the image below. This may be a great time get some coffee, as the installation can take a while.
NOTE: Xcode Command Line Tools Depend on the OS Version
Apple releases MacOS updates relatively frequently. It is often necessary to update the Xcode command line tools after an OS update. If brew suddenly starts failing after a recent OS update, try running the $ xcode-select --install command again to see if that resolves the issue.
Install Homebrew, Python 3, Node & Optionals
The following script will install some tools we will use including:
Homebrew
pyenv
Python 3
Pip 3
Git
Node
VS Code
It will also give some options to automatically install:
Firefox
Google Chrome
Slack for Mac
NOTE: Remove Previous Installations Before Running the Installfest Script
Adies are curious and have often installed some of these tools already. If this describes you, please remove any previous installations of Homebrew, Python, Node, Git, or VS Code before running the Installfest script. This will help avoid conflicts and ensure that the correct versions are installed so that everyone is using the same tools.
If you are unsure how to remove these tools, please reach out for help in Slack!
If you already have any of the optional tools installed, you do not need to uninstall them. Just respond 'N' when prompted to install them. If you do not have them installed, you should install at least one of the web browsers (Firefox or Chrome), and Slack. The curriculum will assume you have access to one of these browsers, and Slack is required for communication. There should be no issue with using installations of the optional tools that you performed on your own.
To run the install script:
Copy the line below in its entirety (avoiding the $), paste it into the terminal and hit enter.
You will be prompted for your password. Don't be alarmed if you don't see anything appear as you type. It's still getting entered.
$ /bin/zsh -c "$(curl -fsSL https://gist.githubusercontent.com/ada-instructors/21027e509214e96551b1a20943e9731c/raw/ada_installfest.zsh)"
When the install finishes, quit and restart your terminal. Without doing this, the installation above may not take affect.
NOTE: Check for Errors After Running the Installfest Script
Be sure to read any messages that appear in the terminal after running the script. If there are any errors, please reach out for help in Slack.
Next Steps
Some tools like VS Code have actions we need to take to set them up after the Installfest script runs. Expand the sections on each tool below for information about them and instructions to finish setting up or verifying their installations.
Troubleshooting Application Permissions
The following warning may appear when trying to run any of the applications we installed.
If displayed, we can fix it by going to System Preferences > Security & Privacy, and selecting the button Open Anyway.
VS Code
VS Code is a very extensible open-source editor which supports a variety of languages including Python, and JavaScript.
To launch VS Code from the terminal, type code followed by the file name or directory name
For example $ code . will open the present directory as a project folder.
VS Code Extensions
VS Code also supports a number of extensions which can be installed to provide new or different functionality.
Extensions can be searched for and installed from the "Extensions" menu on the sidebar of VS Code.
Fig. The Extensions button (circled) in the sidebar of VS Code
Required Extensions
This extension is required for doing Python development in VS Code.
Python - The standard Python extension to provide syntax highlighting and code suggestions.
After installing the Python extension:
Open the command-palette with shift + cmd + p and enter Python: select interpreter
Select the Python interpreter that was reported when we checked the version earlier.
Fig. Locate the option to select the Python interpreter
Fig. Pick the Python version that matches the version reported earlier.
Recommended Extensions
Some recommended extensions include:
Live Share - A way to collaborate on source code like Google Docs.
Markdown All in One - An extension to help writing markdown files
Indent Rainbow - A nice extension to help you line up your indentations.
ESLint - A style checker for JavaScript code.
Git History - Adds useful commands to VS Code for exploring and managing the history of Git repositories.
There are many extensions available for VS Code, experiment with them and see what what works best for you!
Homebrew
Homebrew is a package manager for Mac. Basically that means that Homebrew helps us install programs, update them, and prevent conflicts between applications or tools.
Verification
We can verify that homebrew is working properly by entering the following command in the terminal:
$ brew doctor
We should see (after a bit of processing) Your system is ready to brew.
pyenv
pyenv is a tool for managing Python versions. It allows us to choose a python version to set globally on the machine for development, while still allowing folks to easily switch between multiple versions of Python.
We are using pyenv to ensure the whole class is using the same Python version. This helps us avoid compatibility issues between our Python version and the versions of dependencies we will be using in projects throughout the curriculum.
Verification
We can verify that the pyenv installation worked by running the command $ pyenv --version. We should see output that is similar to pyenv 2.5.5. A newer (larger-numbered) version is also fine, and only means that time has elapsed since these instructions were last updated.
Python 3
Macs come with an older version of Python 3, which is primarily intended for use by the Mac system software itself. To develop our own Python programs, we set up a newer version of Python that we can update and modify without affecting the system-installed version. The long command we entered previously used Homebrew to install it.
PIP - Python's Package Installer Program
We also use a program called pip to install additional python packages which we can then use in our programs. Pip was installed along with Python 3 during the previous command.
Verification
We can verify that the Python installation worked by running the command $ python --version and see that it prints Python 3.13.1. We should see exactly this Python version.
If you see a newer version (larger-numbered) or an older (smaller-numbered, such as a version starting with 3.12 or lower) Python is not using the correct version. Perhaps the step above about restarting the terminal was skipped. Try quitting the terminal and reopening it to see if that fixes it... If not, reach out to a classmate or instructor!
We should also verify that pip is working with $ pip --version. It should be in a python3 folder and display a message like pip 24.3.1 from /Users/user_name/.pyenv/versions/3.13.1/lib/python3.13/site-packages/pip (python 3.13). Again, a newer version is fine, but an older version (such as 23.0 or lower) is a sign that something went wrong.
Git
Git is an open source distributed version control system. We will talk about Git in significant detail later. The short version is that we will use Git to version and share our code with others. We will spend a lot of time using Git in the Terminal, so it will become important that we configure the Terminal to have all of our Git preferences, and personalize it with our personal information.
Verification
We can confirm whether Git is installed properly by entering the following commands at the terminal.
$ git config --get user.name Should show your name. This was prompted by the Installfest script.
$ git config --get user.email Should show the email address associated with your GitHub account. This was also prompted by the Installfest script.
$ git config --global core.editor "code --wait"
This will set VS Code to be the default editor for Git commit messages (more on that in the course).
This should have been set by the Installfest script as well, but it doesn't hurt to run it again here.
Browsers
We will be using Firefox as our primary browser at Ada. If you did not elect to install it automatically during the installfest script, we can install it with:
$ brew install --cask firefox
Or we can go to the website and install it manually.
It's often useful to have multiple browsers installed for development purposes. Another fine browser to install is Google Chrome. We can install Google Chrome with Homebrew by typing:
$ brew install --cask google-chrome
Or again, we can go to Google's website and install it manually.
It's All About Communication! Slack
We should already have Ada's primary mode of communication installed... Slack!. Check out the collapsible "Slack" section above for more information on how we use Slack through the cohort.
There should have been a prompt to install it during the Installfest script. While it is possible to get by using the Slack website, we recommend strongly to use the Desktop client. If you did not use the Installfest script to install it, we can install Slack now with homebrew, using the command:
$ brew install --cask slack
Or we can go to slack.com and install it manually.
Customizing the Shell: Optional Set up for Oh My Zsh
Zsh is a very customizable environment, and there's a great community-driven framework for managing zsh configurations, providing thousands of helper functions, plugins, and themes. Basically, it lets us customize the look and feel of the terminal and add custom commands and shortcuts. The most amazing thing is that it comes with git integration!
Using Oh My Zsh is completely optional at Ada, but it can be handy for its support of Git and other extensibility. You are welcome to install it if this sounds interesting.
Oh My Zsh can be installed with:
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
You can read more about it on the oh my zsh homepage.
NOTE: Oh My Zsh Takes Over the Shell Configuration
Many settings related to zsh are stored in our home directory in a hidden file called .zshrc. Oh My Zsh writes its own configuration there on installation or update. If we have any of our own configuration, such as creating command aliases, these can be lost when Oh My Zsh updates.
The most common way this is observed is when the shorter aliases of python, instead of python3, and pip, instead of pip3, stop working. This might mean that Oh My Zsh has overwritten the shell configuration. If this happens, please reach out for support on Slack.