****************
Anaconda install
****************

On MS Windows, macOS, and Linux, it is best to install Anaconda for the local user, 
which does not require administrator permissions and is the most robust type of 
installation. For users on any of the three platforms who need to do so, 
Anaconda can also be installed system wide, which does require administrator 
permissions.

TIP: If you don't want the hundreds of packages included with Anaconda, you can 
`download Miniconda <http://conda.pydata.org/docs/install/quick.html>`_, a 
mini version of Anaconda that includes just conda, its dependencies, and Python.

Anaconda for Windows install
----------------------------

`Download the Anaconda installer <http://continuum.io/downloads.html>`_.

Optional: :doc:`Verify data integrity with MD5 or SHA-256 <hashes/index>`.
`more info on hashes <http://conda.pydata.org/docs/download.html#what-about-cryptographic-hash-verification>`_

Double click the Anaconda installer and follow the prompts to install to the default location.

NOTE: Install Anaconda into a path that does not contain spaces or unicode characters.

NOTE: Do not install as Administrator unless admin privileges are required.

NOTE: If you encounter any issues during installation, please temporarily disable your anti-virus software during install, then immediately re-enable it. If you have installed for all users, uninstall Anaconda and re-install it for your user only and try again.

After a successful installation you will see output like this:

.. image:: /img/anaconda-install-win.png

When your install is complete, jump to :ref:`verify`


Anaconda for macOS graphical install
------------------------------------

1. Download the `Anaconda installer <http://continuum.io/downloads.html>`_.

2. Optional: :doc:`Verify data integrity with MD5 or SHA-256 <hashes/index>`.
   `more info on hashes <http://conda.pydata.org/docs/download.html#what-about-cryptographic-hash-verification>`_

3. Double click the .pkg file. Answer the prompts on Introduction, Read Me, and License screens.

4. On Destination Select screen, you must select "Install for me only."

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

   |

   .. image:: img/osxbug2.png

   |

5. On "Installation Type" you may choose to install in another location. Standard install  will put Anaconda in your home user directory .

   |

   .. image:: img/customizebutton.png

   |

   NOTE: Advanced users may select "customize" to not add Anaconda to the bash PATH:

   |

   .. image:: img/pathoption.png

   |

6. Click the Install button.

After a successful installation you will see output like this:

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

When your install is complete, begin using Anaconda with the instructions in :ref:`next`

Anaconda for macOS command line install
---------------------------------------

1. Go to the `DOWNLOAD ANACONDA NOW <https://www.continuum.io/downloads>`_ page. 
   Beneath the "Graphical Installer" buttons for Anaconda for macOS, there are command-line text links for Python versions 2.7 and 3.6.

2. Download the command line installer for Anaconda with Python 2.7 or Anaconda with Python 3.6.

3. Optional: :doc:`Verify data integrity with MD5 or SHA-256 <hashes/index>`.
   `more info on hashes <http://conda.pydata.org/docs/download.html#what-about-cryptographic-hash-verification>`_

4. Python 2.7: Open the Terminal.app or iTerm2 terminal application and enter the following:

   ``bash ~/Downloads/Anaconda2-4.3.0-MacOSX-x86_64.sh``

   Or for Python 3.6 enter the following:

   ``bash ~/Downloads/Anaconda3-4.3.0-MacOSX-x86_64.sh``

   NOTE: You should include the ``bash`` command regardless of whether you are 
   actually using the bash shell.
   
   NOTE: Replace ~/Downloads with your actual path and Anaconda3-4.3.0-MacOSX-x86_64.sh with your actual file name.

The output of a successful installation will include the messages "Installation
finished." and "Thank you for installing Anaconda!"

When your install is complete, begin using Anaconda with the instructions in :ref:`next`


.. _linux-install:

Linux install
-------------

`In your browser download the Anaconda installer for Linux <http://continuum.io/downloads.html>`_.

Optional: :doc:`Verify data integrity with MD5 or SHA-256 <hashes/index>`.
`more info on hashes <http://conda.pydata.org/docs/download.html#what-about-cryptographic-hash-verification>`_

Open a terminal window and type the following::
    
    bash ~/Downloads/Anaconda3-4.3.0-Linux-x86_64.sh

NOTE: Replace ~/Downloads with your actual path and Anaconda3-4.3.0-Linux-x86_64.sh with your actual file name.

NOTE: Accept the default location or select a 
user-writable install location such as ``~/anaconda``.

NOTE: Install Anaconda as a user unless root privileges are required.

Follow the prompts on the installer screens, and if unsure about any 
setting, simply accept the defaults, as they can all be changed later.

NOTE: If you select the option to not add the Anaconda directory to your 
bash shell PATH environment variable, you may later add this line to 
the file .bashrc in your home directory: ``export PATH="/home/username/anaconda/bin:$PATH"``
Replace /home/username/anaconda with your actual path.

The output of a successful installation will include the messages "Installation
finished." and "Thank you for installing Anaconda!"

Finally, close and re-open your terminal window for the changes to take effect.

When your install is complete, begin using Anaconda with the instructions in :ref:`next`


.. _silent:

Silent mode install
-------------------

You can use `silent mode <http://conda.pydata.org/docs/help/silent.html>`_ to 
automatically accept default settings and have no screen prompts appear during 
install.

.. _uninstall:

Uninstall Anaconda
------------------

To uninstall Anaconda you can do a simple remove of the program.

If you also want to remove all traces of the configuration files and directories
from Anaconda and its programs, you can also download and use the Anaconda-Clean
program and then do a simple remove.

Anaconda-Clean
^^^^^^^^^^^^^^

On all systems, you may optionally remove configuration files and directories
from Anaconda and its programs by opening a terminal window
(on Windows: Start - Command Prompt) and installing the conda package
"anaconda-clean"::

    conda install anaconda-clean

Next, in the same window, run either of these two commands:

* Remove all Anaconda-related files and directories with a prompt to answer 
  "yes" before deleting each one::

    anaconda-clean

* Remove all Anaconda-related files and directories without being prompted to 
  delete each one::

    anaconda-clean --yes

Anaconda-Clean creates a backup of all files and directories that might be 
removed, such as ``.bash_profile``, in a folder named ``.anaconda_backup`` in 
your home directory.

Now you are ready to proceed to the simple remove instructions to finish 
uninstalling Anaconda.

Simple remove
^^^^^^^^^^^^^

WINDOWS: In the Control Panel, choose "Add or Remove Programs" or "Uninstall a program" 
and then select "Python 3.6 (Anaconda)" or your version of Python.

MACOS: Open the Terminal.app or iTerm2 terminal application and remove your 
entire Anaconda directory, which will have a name such as "anaconda2" or 
"anaconda3", by entering the following command: ``rm -rf ~/anaconda3``

LINUX: Open a terminal window and remove your 
entire Anaconda directory, which will have a name such as "anaconda2" or 
"anaconda3", by entering the following command: ``rm -rf ~/anaconda3``

.. _updating:

Updating from older Anaconda versions
-------------------------------------

You can easily update to the latest Anaconda version by updating conda, then Anaconda as follows::

   conda update conda
   conda update anaconda

If you wish to install or uninstall the Jupyter Notebook Extensions, please see
the :doc:`jupyter-notebook-extensions` page for instructions.

.. _verify:

Verify your install
-------------------

On all systems, you can confirm that Anaconda is installed and working by opening 
a terminal window (on Windows: Start - Command Prompt) and entering a command such 
as 'conda list'. If Anaconda is installed and working, this will display a list 
of installed packages and their versions.

Another way to confirm that Anaconda is installed and working by opening a 
terminal window (on Windows: Start - Command Prompt) and entering the command 
'python' to run the Python shell. If 
Anaconda is installed and working, the version information it displays when it 
starts up will include "Continuum Analytics, Inc.". Use the command 'quit()' to 
exit the Python shell.


.. _next:

What's next?
------------

If you had any trouble with installation, please see the information 
on :ref:`Anaconda support <anaconda-support>`.

If you are new to Anaconda and the conda package manager, we recommend you 
try the :doc:`navigator`, the easy graphical interface for working with Anaconda.

If you prefer to use a terminal window or command prompt, 
download the `conda cheat sheet <http://conda.pydata.org/docs/using/cheatsheet.html>`_,
try the `conda test drive <http://conda.pydata.org/docs/test-drive.html>`_, and 
learn more about `using conda <http://conda.pydata.org/docs/using/using.html>`_. 

For examples of data science and data visualization using Anaconda, see 
the `Continuum Analytics developer blog <https://www.continuum.io/blog/developer-blog>`_, which 
has examples such as `using Anaconda and Datashader to map US Census 
data <https://www.continuum.io/blog/developer-blog/analyzing-visualizing-big-data-interactively-laptop-datashading>`_ 
and `using Anaconda and Bokeh to analyze data from firefighter helmet 
sensors <https://www.continuum.io/blog/developer-blog/using-bokeh-nist>`_.
