Skip to main content Link Menu Expand (external link) Left Arrow Right Arrow Document Search Copy Copied

Lesson 0 - Using your IDE

This lesson will go over the basic functionality of the IDEs highlighted in the Preparation page.

Table of Contents

Lesson Objectives

  • Learn how to create, edit, and run Python files.

Choose your IDE

Follow the instructions outlined in one of the dropdown menus below.

Jupyter Notebook - Recommended

If you haven’t already, sign in to Jupyter Notebook.

The home page of Jupyter Notebook is the file explorer, where you can access any files you created. If it’s your first time using Jupyter Notebook, it’ll be empty. To create a new Python Notebook file (.ipynb), click on the New button at the top right and select Python3 (ipykernel).

creating a new python notebook file in Jupyter Notebook


You should automatically be sent to your Python Notebook environment. It should look like the screenshot below.

  • If you ever want to go back to the home page, click on the JupyterHub logo at the top left.
  • You can rename your Python Notebook file by clicking on the “Untitled” text beside the JupyterHub logo.
  • To save your file, use the Save and Checkpoint button with a disk icon found below the JupyterHub logo. You can also use Ctrl + S shortcut (or Cmd + S for Mac users) to save.

jupyterhub page interface


Your Python Notebook file consists of code blocks. You can write Python code in these blocks and run them using the Run button. If there’s any output, it will be shown directly below that code block.

If a code block is taking too long to run, you might have encountered an infinite loop. Use the interrupt the kernel button beside the Run button to stop it.

using jupyterhub codeblock


To create new code blocks, click on the + button beside the Save and Checkpoint button.

creating more code blocks

No matter what code block you’re on, Python Notebook will keep the data of all previously run code blocks. If you’re opening up a Notebook, or your Notebook connection resets, you have to run every block code from the start.

Google Colab - Online Alternative

If you haven’t already, sign in to Google Colab.

After signing in, you may encounter the Recent page below. This is where you’ll be able to open up recent Python Notebook files (.ipynb). To create a new Python Notebook file, we’ll need to Cancel out of this pop-up.

google colab recent files popup


Navigate to the top left of your screen, click on File, and then click on New notebook.

create new notebook in colab


You should automatically be sent to your Python Notebook environment. It should look like the screenshot below.

  • To view all of your Colab files, click on the Colab logo at the top left.
  • You can rename your Python Notebook file by clicking on the “Untitled.ipynb” text beside the Colab logo.
  • Google Colab automatically saves your work, no need for manual saving.

google colab code interface


Your Python Notebook file consists of code blocks. You can write Python code in these blocks and run them using the Run button. If there’s any output, it will be shown directly below that code block.

If a code block is taking too long to run, you might have encountered an infinite loop. Use the interrupt the kernel button beside the Run button to stop it.

using a code block in google colab


To create new code blocks, click on the + button beside the Save and Checkpoint button.

No matter what code block you’re on, Python Notebook will keep the data of all previously run code blocks. If you’re opening up a Notebook, or your Notebook connection resets, you have to run every block code from the start.

creating code blocks in google colab

Anaconda - Local Version of Jupyter Notebooks

If you haven’t already downloaded and installed Anaconda:

Once that’s installed, open up the Anaconda Navigator application. Included in the Anaconda package are four great tools/IDEs to create Python files with. JupyterLab, Jupyter Notebooks, Spyder, and Visual Studio Code.

Spyder and Visual Studio Code are standalone IDEs, whereas JupyterLab and Jupyter Notebooks opens up locally in your browser. For the purposes of this workshop, we recommend you use Jupyter Notebooks.

anaconda navigator menu


When you first launch Jupyter Notebooks, you will see a file explorer. Go to the location you want to store your Python files in, (I recommend making a new “Python” folder in the Documents directory).

local jupyter notebook file explorer


To create a new Python Notebook file (.ipynb), click on the New button at the top right and select Python3 (ipykernel).

creating a python notebook file in jupyter notebook


You should automatically be sent to your Python Notebook environment. It should look like the screenshot below.

  • If you ever want to go back to the home page, click on the JupyterHub logo at the top left.
  • You can rename your Python Notebook file by clicking on the “Untitled” text beside the JupyterHub logo.
  • To save your file, use the Save and Checkpoint button with a disk icon found below the JupyterHub logo. You can also use Ctrl + S shortcut (or Cmd + S for Mac users) to save.

jupyter notebook interface


Your Python Notebook file consists of code blocks. You can write Python code in these blocks and run them using the Run button. If there’s any output, it will be shown directly below that code block.

If a code block is taking too long to run, you might have encountered an infinite loop. Use the interrupt the kernel button beside the Run button to stop it.

using a code block jupyter notebook


To create new code blocks, click on the + button beside the Save and Checkpoint button.

creating code blocks jupyter notebook

No matter what code block you’re on, Python Notebook will keep the data of all previously run code blocks. If you’re opening up a Notebook, or your Notebook connection resets, you have to run every block code from the start.

Key Points / Summary

  • There are many ways to create, edit, and run Python files.