===============
Getting started
===============

.. contents::
   :local:
   :depth: 2


.. _navigator-starting:

Starting Navigator
==================

**WINDOWS**

After you install Anaconda on Windows, start Navigator by:

* Clicking the Anaconda Navigator desktop app from the start menu.
* Or by opening an Anaconda Prompt from the start menu and running the command ``anaconda-navigator``.

**MacOS**

After you install Anaconda on macOS, start Navigator by:

* Clicking the Navigator menu item that was automatically added to your menu.
* Or open Launchpad, click Terminal or iTerm and enter the command ``anaconda-navigator``.

**Linux**

After you install Anaconda on Linux, start Navigator by opening a Terminal
window and entering the command ``anaconda-navigator``.

Anaconda does not add shortcuts for Linux
automatically because different Linux distributions have different systems for
adding menu or desktop shortcuts. You can use your operating system to create
desktop and/or main-menu shortcuts that run the command ``anaconda-navigator``.

.. _navigator-basic-workflow:

Basic workflow
==============

The basic workflow for using Navigator to install and run a package is:

#. Create and activate a new environment for the package.

#. Find and install the package.

#. Work with the environment where you can access the package.

Each step is detailed below.

Creating and activating a new environment for a package
-------------------------------------------------------

For this example, let's suppose you want to run BioPython, a popular library for biologists.
A quick Google search shows that it's available for Windows, macOS and Linux, 32-bit
and 64-bit, and all versions of Python back to 2.6. We'll create an environment using
the newest version, Python 3.6.

NOTE: We recommend always using the latest version of Python.

To create a new environment:

#. In Navigator, click the **Environments** tab, then click the Create button.

   The Create new environment dialog box appears.

#. In the Environment name field, type a descriptive name for your environment.

   .. figure:: /img/navigator-tutorial01.png

      ..

   |

#. In the Python version list, select Python 3.6.

#. Click the Create button.

   Navigator creates the new environment and activates it, as shown by the highlighted green bar.
   All actions take place in the active environment.

   .. figure:: /img/navigator-tutorial02.png

      ..

   |

.. _navigator-install-package:

Finding and installing a package
------------------------------------------

#. In the list at the top left of the packages area, select All.

#. In the Search Packages box, type the name of the package.

#. In the search results, select the checkbox next to the package.

   .. figure:: /img/nav-tutorial03.png

      ..

   |

#. In the Install Packages window, review the packages to be installed, then click Apply button. Then in Navigator, click the Apply button.

   .. figure:: /img/nav-tutorial04.png

      ..

   |

#. In the confirmation dialog, click the Ok button. All package files and dependencies are installed in your new environment.

.. _navigator-use-environment:

Using an environment
--------------------

#. On the **Environments** tab, click the environment name. The environment
   name is highlighted and the environment is activated.

#. To show options for using your environment, click the arrow button to
   the right of the environment name.

   .. figure:: /img/navigator-tutorial05.png

      ..

   |

If you select Open Terminal--as in the example above--a terminal window appears.

If you select Open with Python, a terminal window running a Python interactive
shell appears.

If you select Open with IPython, a terminal window running an IPython
interactive shell appears.

If you select Open with Jupyter Notebook, Jupyter Notebook will open in a new
browser window or tab.

To exit Jupyter Notebook:

#. Close the notebook tabs or windows in the browser.

#. Press Ctrl-C in the terminal window.

#. To stop the notebook, in the terminal window, type ``Y``, then press Enter.

#. To exit the terminal window, type ``exit``, then press Enter.
