Using Anaconda Navigator | Python using Anaconda Navigator
Anaconda Navigator is a graphical user interface (GUI application that allows you to launch different applications and easily manage conda packages without using command-line commands. It can also search for packages on Anaconda Cloud or in a local Anaconda directory. It can work with Windows, macOS as well as Linux.
Python IDLE must be installed before installing Anaconda navigator.
How to run Python commands Using Anaconda Navigator
- Click at start Menu-> All Programs-> Anaconda3 (32 Bit) ->Anaconda Navigator.
2. Anaconda Navigator will open as shown below
There are many options available in this window. We can launch Jupyter Notebook or Spyder to use Python commands.
Introduction to Jupyter Notebook
Jupyter Notebook is a tool for making Python programs. It automatically opens in web browser.
1. When we click at Launch Button under Jupyter Notebook Option in Anaconda Navigator, It will open Jupyter dashboard on your web browser. It will show list of the notebooks, files and subdirectories as:
2. To use Python commands in Jupyter Notebook, we need to click at New -> Python3
3. A new notebook will open up on new tab as:
Ways to make Python programs in Jupyter Notebook
We can make Python programs in two modes using Jupyter Notebook:
- Interactive Mode
- Script Mode
Interactive Mode
In Interactive mode, we can directly type Python statements in Code cell and click at Run to see the output immediately in next line. It is shown as follows:
Script Mode
In script mode, we can save the Python statements in a file. Python statements written in this file will run one after another.
Creating and running a script
To create and run a Python script in Jupyter Notebook, we need to follow following steps:
1. Write the Python code in code cell. We can write multiple statements in code cell as:
2. Click at name of script i.e. Untitled4 in this case
3. A new dialog box with title Rename Notebook will open as :
4. We can specify any name in this dialog box. Click Rename Button to save the script.
5. Click at Run to execute the python code and output will be shown in next line as:
Introduction to Spyder IDE
Spyder is a powerful interactive development environment for working with Python. It has advanced editing, analysis, debugging features. It is also a comprehensive development tool with the data exploration, interactive execution, deep inspection, and beautiful visualization capabilities.
How to use Spyder IDE
- When we click at Launch Button under Spyder Option in Anaconda Navigator or Click Start->All Programs->Anaconda Navigator3(32 Bit) -> Spyder to open Spyder IDE. It will open Spyder IDE as shown below:
- Spyder IDE window is divided in different parts as shown above.
Ways to make Python programs in Spyder IDE
We can make Python programs in two modes:
- Interactive Mode
- Script Mode
Interactive Mode
In Interactive mode, we can directly type Python commands in Ipython Console get output immediately in next line. It is shown as follows:
We can type Python commands in front of In prompt to get output
Script Mode
In script mode, we can save the Python statements in a file. Python statements written in this file will run one after another.
Creating and running a script in Spyder IDE
To create and run a Python script in Spyder IDE, we need to follow following steps:
To create a Python script or file we need to follow following steps
- Click at File-> New File.
2. A new script will appear in editor pane with name as Untitled0.py as:
3. We can type multiple Python commands in this pane and save it by clicking at File->Save
4. A new dialog Box will appear as :
5. We can specify name of Python script in File Name
6. Click save to the save the script.
7. Click at Run button to run the Script.
The output of script will be displayed in Python Console Window as shown above.