======================
Installing on macOS
======================

You can install Anaconda using either the graphical installer ("wizard") or the
command line ("manual"). If you are unsure, choose the graphical install.

macOS graphical install
=======================

#. Download the graphical `macOS installer <https://www.anaconda.com/downloads#macos>`_ for your version of Python.

#. OPTIONAL: :doc:`Verify data integrity with MD5 or SHA-256 <hashes/index>`.
   For more information on hashes, see `What about cryptographic hash verification? <http://conda.pydata.org/docs/download.html#what-about-cryptographic-hash-verification>`_.

#. Double-click the ``.pkg`` file.

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

#. On the Destination Select screen, select Install for me only.

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

   .. figure:: /img/osxbug2.png

      ..

   |

#. On the Installation Type screen, you may choose to install in another location. The standard install puts Anaconda in your home user directory:

   .. figure:: /img/customizebutton.png

      ..

   |


#. Click the Install button.

   A successful installation displays the following screen:

   .. figure:: /img/anaconda-install-osx.png

      ..

   |

#. OPTIONAL: Verify the installation. :doc:`verify-install`.


Using the command-line installer
================================

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

#. In your browser, download the command-line version of the
   `macOS installer <https://www.anaconda.com/downloads#macos>`_ for your system.

#. OPTIONAL: :doc:`Verify data integrity with MD5 or SHA-256 <hashes/index>`.
   For more information on hashes, see `What about cryptographic hash verification? <http://conda.pydata.org/docs/download.html#what-about-cryptographic-hash-verification>`_

#. Install for Python 2.7 or 3.6:

   * For Python 2.7, open the Terminal.app or iTerm2 terminal application and then enter the following::

       bash ~/Downloads/Anaconda2-4.4.0-MacOSX-x86_64.sh

   * For Python 3.6 enter the following::

       bash ~/Downloads/Anaconda3-4.4.0-MacOSX-x86_64.sh

   NOTE: Include the ``bash`` command regardless of whether you are
   actually using the Bash shell.

   NOTE: Replace ``~/Downloads`` with your actual path and ``Anaconda3-4.4.0-MacOSX-x86_64.sh`` with your actual filename.

#. The installer prompts "In order to continue the installation process, please review the license agreement."
   Click Enter to view license terms.

#. Scroll to the bottom of the license terms and enter yes to agree to them.

#. The installer prompts you to Press Enter to confirm the location, Press CTRL-C to cancel the installation
   or specify an alternate installation directory. If you accept the default install location, the installer
   displays "PREFIX=/home/<user>/anaconda<2 or 3>" and continues the installation. It may take a few minutes to complete.

   NOTE: We recommend to accept the default install location.

#. The installer prompts "Do you wish the installer to prepend the Anaconda<2 or 3> install location to PATH
   in your /home/<user>/.bash_profile ?" We recommend "yes".

   NOTE: If you enter "no", specify the path to Anaconda.

   * Add ``export PATH="/<path to anaconda>/bin:$PATH"`` in .bashrc or .bash_profile.

   * Or set the PATH variable: ``export PATH="/<path to anaconda>/bin:$PATH"``

   Replace "<path to anaconda>" with the actual path to your Anaconda installation.

#. The installer finishes and displays "Thank you for installing Anaconda<2 or 3>!"

#. Close and open your terminal window for the installation to take effect. To verify the installation, see
   :doc:`Verifying your installation <verify-install>`.

To begin using Anaconda, see :doc:`../user-guide/getting-started`.
