Note that this site is in currently in version 1.0.0-alpha.   Some functionality may be limited.

How to install Python (and Anaconda) for macos

Anaconda is a distribution of Python. It provides a Python programming environment, the Jupyter notebook environment, and the conda package management system.

For the Digital Humanities Research Institute, we are choosing to use and download Anaconda as it allow us to get all the required software for this institute (python, conda, and the Jupyter notebook environment) in a single download. Anaconda also includes many useful packages for machine learning, and data analysis that will be helpful should you choose to go further in your Python journey!.

Step 1: Download Python 3.+

Visit the Anaconda website on your internet browser, such as Firefox or Chrome, and scroll to the bottom of the page. Here, click on the 64-Bit Graphical Installer under the MacOS Python 3.+ version menu. Our screenshot below shows python 3.8, but any latest python 3.+ version will work with our instructions and the institute.

You can ignore this. Just close this screen.

You can either let your browser open with the Installer, or save it and open it yourself.

Screenshot: Anaconda download webpage with 3.8 button highlighted Screenshot: Anaconda thank you image

Step 2: Run Anaconda Installer

After the download has completed, if it doesn’t open automatically, double-click on the installer file you just saved on your computer. Click Continue:

You should then see the initial install screen. Click Continue:

Click Continue again:

Accept the license by clicking I Agree:

Click Install. Only change the install location if you know what you are doing:

Click Install Microsoft VSCode. If it is already installed, click Continue:

This is the final installation window. Just click Close:

You can move the installer to the Trash to save space on your hard drive by clicking Move to Trash:

Screenshot: Anaconda installer: security image Screenshot: initial installation image Screenshot: software licence agreement image Screenshot: licence agreement Screenshot: standard install on macintosh Screenshot: menu option to also install vscode Screenshot: final installation window for anaconda Screenshot: move to trash image

Step 3: Run conda from your terminal

NOTE: this step only applies to MacOS Catalina and Big Sur. For all previous version of MacOS, skip to Step 4 This step ensures that you will be able to run anaconda directly from your terminal.
Open your macOS terminal. You can find your terminal by clicking the “magnifying glass” icon (also known as Spotlight) on the upper-right hand corner of your menubar or press command + space, type Terminal and press enter. In your terminal, you will run a few lines of code to make sure that the terminal knows how to start Anaconda. Type in the following lines of code, after the %, pressing enter after each line:

cd ~
bash
source .bash_profile
conda init zsh

If this step is successful, when you close and re-open terminal, your command prompt % should have (base) in front of it.

Step 4: Check if Anaconda and Python are successfully installed

Open the macOS terminal. You can find your terminal by clicking the “magnifying glass” icon (also known as Spotlight) on the upper-right hand corner of your menubar or press command + space, type Terminal and press enter. In your terminal, type python and press enter. The terminal should print something like:

~$ python
Python 3.7.7 (default, May  6 2020, 04:59:01) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Type exit() to leave Python.

Step 5: Ensure Anaconda Is Up-to-Date

Now that Anaconda is installed, you need to ensure that Anaconda is updated to the newest version for this workshop. Go to our Insight section for Keeping your Anaconda installation up to date to learn more about how to keep your Anaconda installation up-to-date.