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

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


.. _navigator-starting:

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

When you install Anaconda on Windows, a Navigator menu item is automatically added
to your programs menu and an icon is added to your desktop. You can use either 
to start Navigator.

When you install Anaconda on macOS, a Navigator menu item is automatically added
to your programs menu.

On macOS you can start Navigator by clicking the Navigator menu item, or by 
opening a terminal window and running the command ``anaconda-navigator``.

On Linux you can start Navigator by opening a terminal window and running the 
command ``anaconda-navigator``.

When you install Anaconda on Linux, Anaconda does not add shortcuts 
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 Ok 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 list that appears, select Mark for installation.

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

      ..

   |

#. To begin installing the package, click the Apply button.

   .. figure:: /img/nav-tutorial04b.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.
