Anaconda and Python Installation with Jupyter basics (#New learnings Python#2)

au
3 min readJul 4, 2021

Anaconda is an open-source distribution that simplifies package management and deployment. Package versions are managed by the package management system ‘Conda’. You will need various Python packages (or synonymously, libraries) for specific purposes. Its easier to install Python as well as the packages using Anaconda, since it comes preloaded with most of the packages you’ll need.

Advantages of using Anaconda

  1. Easy to manage and get started with most requirements for ML/AI problems
  2. Anaconda comes with many libraries such as NumPy, OpenCV, SciPy, PyQt, the Spyder IDE, etc.

Anaconda can be downloaded from anaconda.org and can be installed like any other normal software. There is no need to download Python separately; the Anaconda installer will do this for you. Make sure you select Python 3.x while downloading Anaconda.

Note for experienced Python programmers: In case you’re already using Python along with an existing package manager such as pip or easy_install, you can continue to do so. However, make sure you’re using Python 3.x.

Jupyter Notebook

You’ll use the Jupyter IPython Notebook as the main environment for writing Python code throughout this program. The main advantage of using Jupyter Notebook is that you can write both code and normal text (using the Markdown format in Jupyter) in the notebooks. These notebooks are easy to read and share and can even be used to present your work to others. Here’s a brief overview of Jupyter Notebook.

Refer to Jupyter/IPython Notebook Quick Start Guide — Jupyter/IPython Notebook Quick Start Guide 0.1 documentation (jupyter-notebook-beginner-guide.readthedocs.io)

Few basic things to remember:

Headings

  • # for the titles
  • ## for the main headings
  • ### for the subheadings
  • #### for the smaller subheadings
  • ##### for the italic subheadings

Emphasis

  • __string__ or **string** for bold text
  • _string_ or *string* for italic text

Monospace fonts

  • A back single quotation mark ` on both sides to get monospace fonts

Line breaks

  • <br> wherever you want a line break, as the notebook sometimes doesn`t give you the required line break where you want it

Indenting

  • > to indent the text
  • >> for further indenting it, and so on

Bullets and numbering

  • A single dash, i.e. - followed by two spaces to make bullet points
  • A number and a dot followed by a space, i.e. 1. to make numbered lists

Colouring

  • <font color = blue, yellow, red, pink, green, etc.> String </font> to give your font any colour that you want

LaTeX Equations

  • $ on both the sides of the text to write LaTeX equations

For more help while typing, after running cell and the cell turns blue then key in P to see the list:

Additional help

Command mode shortcuts

  • Esc: To go into command mode
  • Enter: To go back to edit mode
  • M: To convert a cell to a markdown cell
  • Y: To convert a cell back to a code cell
  • A: To insert a new cell above
  • B: To insert a new cell below
  • D + D: To delete cell
  • Z: Undo the last operation
  • F: To find and replace on your code
  • Shift + Up/Down: To select multiple cells
  • Space: Scroll notebook downwards
  • Shift + Space: Scroll notebook upwards

Edit mode shortcuts

  • Shift + Enter: To execute the code in the current cell and go to the next cell
  • Alt + Enter: To execute the code in the current cell and insert new cell below
  • Shift + Tab: To get a brief documentation of the object that you have just typed in the coding cell
  • Ctrl + Shift + -: To split the cell at the cursor
  • Shift + M: To merge selected cells

Refer to Jupyter Notebook Magic Commands for more details.

Will continue to cover more things on Python in the upcoming week. Until then, keep learning :)

--

--

au

Healthcare IT specialist | Problem solver | Technologist | Knowledge of Python, ML and AI | MS (Liverpool John Moores University)