Installing on macOS#

Using Anaconda in a commercial setting?

You may need to purchase a license to stay compliant with our Terms of Service. This can be accomplished through several of Anaconda’s tiers: Pro, Business (On-prem), Business (Cloud), or Enterprise. If you have already subscribed to the Pro or Business tiers, see the quickstart guide for Pro or Business to get started!

Visit the Organizations pricing page to compare tier capabilities and pricing.

Install Anaconda Distribution using either the install wizard or the command line instructions below. If you are unsure, choose the graphical install.

Wizard install#

More of a visual learner? Watch the Installing Anaconda (Mac) video in the course linked below!

Anaconda install for macOS

  1. Download the graphical macOS installer for your version of Python.

  2. Double-click the downloaded file and click Continue to start the installation.

  3. Answer the prompts on the Introduction, Read Me, and License screens.

  4. Anaconda recommends that you choose Install for me only. If you do not want to install Anaconda Distribution into your home folder, select Install on a specific disk….

    Caution

    The installer may skip the Destination Select page during installation, which will cause the installation to fail. If the installer skips this page, click Change Install Location… on the Installation Type page to get to this step.

    Note

    If you get the error message “You cannot install Anaconda in this location,” reselect Install for me only.

  5. Click Install.

    Note

    If you get the error message “This package is incompatible with this version of macOS,” please see here for troubleshooting help.

  6. Once the install is complete, click Continue.

  7. Optional: To learn more about Anaconda’s cloud notebook service, go to https://www.anaconda.com/code-in-the-cloud.

    Or click Continue to proceed.

  8. A successful installation displays the following screen:

  9. Verify your installation.

Command line install#

Use this method if you prefer to use a terminal window.

  1. In your browser, download the command-line version of the macOS installer for your system.

  2. (Recommended) Verify the installer’s data integrity with SHA-256. For more information on hash verification, see cryptographic hash validation.

    • Open a terminal and run the following:

      shasum -a 256 /PATH/FILENAME
      # Replace /PATH/FILENAME with your installation's path and filename.
      
  3. Install for Python 3.7 or 2.7:

    • For Python 3.7, enter the following:

      # Include the bash command regardless of whether or not you are using the Bash shell
      bash ~/Downloads/Anaconda3-2020.05-MacOSX-x86_64.sh
      # Replace ~/Downloads with your actual path
      # Replace the .sh file name with the name of the file you downloaded
      
    • For Python 2.7, open the Terminal.app or iTerm2 terminal application and then enter the following:

      # Include the bash command regardless of whether or not you are using the Bash shell
      bash ~/Downloads/Anaconda2-2019.10-MacOSX-x86_64.sh
      # Replace ~/Downloads with your actual path
      # Replace the .sh file name with the name of the file you downloaded
      
  4. Press Enter to review the license agreement. Then press and hold Enter to scroll.

  5. Enter “yes” to agree to the license agreement.

  6. Use Enter/return to accept the default install location, use CTRL+C to cancel the installation, or enter another file path to specify an alternate installation directory.

    Note

    Anaconda recommends you accept the default install location. Do not choose the path as /usr for the Anaconda/Miniconda installation.

  7. If you accept the default install location, the installer displays PREFIX=/home/<USER>/anaconda<2/3> and continues the installation. It may take a few minutes to complete.

  8. Installation may take a few minutes to complete.

  9. The installer prompts you to choose whether to initialize Anaconda Distribution by running conda init. Anaconda recommends entering “yes”.

    If you enter “no”, then conda will not modify your shell scripts at all. In order to initialize conda after the installation process is done, run the following commands:

    # Replace <PATH_TO_CONDA> with the path to your conda install
    source <PATH_TO_CONDA>/bin/activate
    conda init
    

    Note

    If you are on macOS 10.15+, the new default shell is zsh. Once the installation process has completed, initialize conda in a zsh shell by running source <PATH_TO_CONDA>/bin/activate followed by conda init zsh.

  10. The installer finishes and displays, “Thank you for installing Anaconda<2/3>!”

  11. Close and re-open your terminal window for the installation to take effect, or enter the command source ~/.bashrc to refresh the terminal.

  12. You can also control whether or not your shell has the base environment activated each time it opens.

    # The base environment is activated by default
    conda config --set auto_activate_base True
    
    # The base environment is not activated by default
    conda config --set auto_activate_base False
    
    # The above commands only work if conda init has been run first
    # conda init is available in conda versions 4.6.12 and later
    
  13. Verify your installation.

    Note

    If you install multiple versions of Anaconda, the system defaults to the most current version, as long as you haven’t altered the default install path.

Problems?#

See troubleshooting.

What’s next?#

Get started programming with Anaconda in the Getting started with Anaconda guide.