==================================
Alternative installation for macOS
==================================

If you already have Anaconda installed on your computer, you must use the
:doc:`recommended method <navigator>` of installing Fusion to prevent multiple
copies of Anaconda from being installed on your system--multiple installations
could lead to system conflicts.

If you do not have Anaconda installed on your computer, and do not want to
follow the recommended installation method--using Navigator, Fusion can be
installed on your macOS in 2 other ways:

* :ref:`fusion_install_conda_mac`

* :ref:`fusion_install_mac`

.. _fusion_install_conda_mac:

Installing using a conda package on macOS
=========================================

If you already have an Anaconda installation, and are familiar with conda
packages, you can install Fusion as a conda package.

NOTE: Fusion requires Python 3.5. You may create a Python 3.5 conda environment
and install Fusion there even if your conda root environment uses another Python
version such as Python 2.7.

To install Fusion as a conda package:

#. After Excel has been updated, open a terminal window.

#. In the terminal window, run the following command to create the new conda environment where you will install Fusion:

   .. code-block:: bash

    conda create -n fusion-env python=3.5
    source activate fusion-env

   NOTE: Replace ``fusion-env`` with the name you choose for your Fusion environment.

#. After your Fusion environment is created, run the following command to install Fusion:

   .. code-block:: bash

    conda install -c anaconda-fusion anaconda-fusion

#. Close and reopen your terminal window to allow the changes to take effect.

#. To start Fusion in the terminal window, run the command ``fusion``.

The installation is complete. You can open Excel and see :ref:`start_fusion_mac`
for information about activating Fusion in Excel.

TIP: To find the Fusion Examples folder, run the command ``fusion-examples`` to
open a new Finder window with a list of the examples files displayed.

NOTE: When you start Excel during your first Fusion activation on macOS, you
must grant permissions. For more information, see :ref:`add_in_macOS`.

Updating the conda package
--------------------------

To update Fusion with each new release:

#. If you have an open instance of Excel, close that program.

#. Open a terminal window and run:

   .. code-block:: bash

    conda update -c anaconda-fusion anaconda-fusion

Uninstalling the conda package
------------------------------

To uninstall Fusion:

#. Open a terminal window.

#. Run the following command:

   .. code-block:: bash

    source activate your-environment-name

#. After the environment is active, run:

   .. code-block:: bash

    bashconda remove anaconda-fusion

   NOTE: Replace ``your-environment-name`` with the name you used for your environment.

.. _fusion_install_mac:

Installing using a standalone installer on macOS
=================================================

To install Fusion on a macOS:

#. Download the `Fusion macOS installer <https://anaconda.org/anaconda-fusion/anaconda-fusion/1.0.2/download/AnacondaFusion-1.0.2-MacOSX-x86_64.sh>`_

#. Open a terminal window.

#. Change the directory--using command ``cd``--to the downloads folder of your directory--by default this folder is called ``Downloads``

#. To install Fusion, run the following command:

   .. code-block:: bash

    bash AnacondaFusion-1.0.2-MacOSX-x86_64.sh

#. Close and reopen the terminal window to allow the changes to take effect.

#. In a terminal window, run the command ``fusion`` to start Fusion.

The installation is complete. You can open Excel and see :ref:`start_fusion_mac` for information about activating Fusion in Excel.

TIP: To find the Fusion Examples folder, run the ``fusion-examples`` command to open a new Finder window with a list of the examples files displayed in .xlsx format.

NOTE: When you start Excel during your first Fusion activation on macOS, you must grant permissions. For more information, see :ref:`add_in_macOS`.


.. _start_fusion_mac:

Starting Fusion on macOS
========================

To run Fusion, follow the steps below--depending on which installation method you used.

If you followed the :ref:`macOS standalone installation instructions <fusion_install_mac>`:

#. Open a terminal window.

#. Run the command ``fusion``.

If you have followed the :ref:`macOS conda installation instructions <fusion_install_conda_mac>`:

#. Open a terminal window.

#. Activate your conda environment by running the following command:

   .. code-block:: bash

    source activate your-environment-name

   NOTE: Replace ``your-environment-name`` with the name you used for your environment.

#. After the environment is active, start Fusion by running ``fusion``.

Installing additional dependencies
==================================

If you have installed Fusion with an installer, you can install additional conda
packages by taking the following steps:

#. Open a terminal window.

#. In the terminal window, run the following command:

   .. code-block:: bash

    conda install your-dependency-name

   NOTE: Replace ``your-dependency-name`` with the actual name of the package you want to install.

If you have installed Fusion as a conda package, you can install additional conda packages:

#. Open a terminal window.

#. In the terminal window, run:

   .. code-block:: bash

    source activate your-environment-name

   NOTE: Replace ``your-environment-name`` with the name you used for your environment.

#. After the environment is active, run:

   .. code-block:: bash

    conda install your-dependency-name

   NOTE: Replace ``your-dependency-name`` with the actual name of the package you want to install.

Installing the License files
============================

The first time you start Fusion, it will ask you to upload the license file:

.. figure:: /img/fusion_install_license.png
    :width: 70%

|

To upload your license file:

#. Browse your local directory and find the Fusion license file--by default it is named ``license_bundle_20160524191753.txt``.

#. Click the Upload button.

Fusion restarts.

Updating on macOS
=================

To update Fusion with each new release:

#. Close Excel.
#. Uninstall the current version of Fusion.
#. Install the new version.

Fusion is updated.

Uninstalling on macOS
=====================

To uninstall Fusion:

#. Open a terminal window.

#. To remove the folder where Fusion was installed, run:

   .. code-block:: bash

    rm -r ~/AnacondaFusion

Fusion is uninstalled.

Next steps
==========

For information about using Fusion, see :doc:`../user-guide/getting-started`.
