Installing on macOS#
Using Anaconda in a commercial setting?
You might need to purchase a license to stay compliant with our Terms of Service. Visit our pricing page to compare tier capabilities and pricing.
Install Anaconda Distribution using either the graphical installer or the command line installer instructions below. If you are unsure, choose the graphical install.
Graphical install#
Use this method if you prefer to use our graphical installer.
Tip
More of a visual learner? Sign in to Anaconda Cloud to follow along with our Installing Anaconda (Mac) course!
Caution
The graphical installer for MacOS installs Anaconda into /opt/anaconda3
in your file system. If you want to install Anaconda into your Home directory or if you have multiple users on a system and want to manage your installation more carefully, Anaconda recommends the shell (or command line) installer.
Download the graphical (.pkg) macOS installer for your system.
(Optional) Anaconda recommends verifying the integrity of the installer after downloading it.
How do I verify my installer’s integrity?
You can verify your installer’s data integrity with the SHA-256 hash that matches your chosen installer. See the hash index for a list of installers and their hashes. For more information on hash verification, see cryptographic hash verification in the official conda documentation.
To check the integrity of the installer, open Terminal and run the following command:
# Replace <INSTALLER-FILE> with the name of the downloaded installer file shasum -a 256 Downloads/<INSTALLER-FILE>
For example:
shasum -a 256 Downloads/Anaconda3-2023.09-0-MacOSX-x86_64.pkg
Double-click the downloaded file and click Continue to start the installation.
Answer the prompts on the Introduction, Read Me, and License screens.
Anaconda recommends that you choose Install for all users of this computer. As of version 2024.02-1, the default location of the installer is
/opt/anaconda3
. To install elsewhere, select Install on a specific disk….Caution
For installer versions 2023.09 or older, 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 all users of this computer. As of version 2024.02-1, this will install Anaconda in``/opt/anaconda3``.
Click Install.
Note
If you get the error message “This package is incompatible with this version of macOS,” please see here for troubleshooting help.
Once the install is complete, click Continue.
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.
A successful installation displays the following screen:
Command line install#
Use this method if you prefer to use a terminal window.
In your browser, download the command line (.sh) macOS installer for your system.
(Optional) Anaconda recommends verifying the integrity of the installer after downloading it.
How do I verify my installer’s integrity?
You can verify your installer’s data integrity with the SHA-256 hash that matches your chosen installer. See the hash index for a list of installers and their hashes. For more information on hash verification, see cryptographic hash verification in the official conda documentation.
To check the integrity of the installer, run the following command:
# If downloaded via the browser, this should be in the Downloads folder # If downloaded using the curl command, this will be the current directory shasum -a 256 /PATH/TO/INSTALLER-FILENAME
For example:
shasum -a 256 Downloads/Anaconda3-2020.05-MacOSX-x86_64.sh
Install by running the following:
# Include the bash command regardless of whether or not you are using the Bash shell # Replace ~/Downloads with the path to the installer file, if necessary # Replace <INSTALLER_VERSION> with the version of the installer file # For example, Anaconda3-2023.09-0-MacOSX-x86_64.sh bash ~/Downloads/Anaconda3-<INSTALLER_VERSION>-MacOSX-x86_64.sh
View a full list of Anaconda Distribution installers at repo.anaconda.com/archive/. The latest installer versions are always at the top of the list.
Press Enter to review the license agreement. Then press and hold Enter to scroll.
Enter “yes” to agree to the license agreement.
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.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.Installation may take a few minutes to complete.
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 byconda init zsh
.The installer finishes and displays, “Thank you for installing Anaconda<2/3>!”
Close and re-open your terminal window for the installation to take effect, or enter the command
source ~/.bashrc
to refresh the terminal.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
-
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.