Free Online Python and JupyterLab

Jul 19, 2023

DataSciencePursuit

There are two options to run Python in JupyterLab or Jupyter Notebook online for free:

  1. JupyterLite (try jupyter)
  2. Anaconda Cloud

JupyterLite

What is JupyterLite?

As of this page’s update date, JupyerLite is an experimental interface that runs entirely online, for free. It was built using JupyterLab components by Project Jupyter (the same organization that created JupyterLab and Jupyter Notebooks), so it looks very similar to the version you can install on your computer.

It is the top choice because it makes it as easy as possible to start coding. No login or setup is required, which is perfect for beginners.

Now having to create an account also means that it can only store your notebooks for an unknown limited amount of time. It could be as soon as you close the browser or however long your browser caches or stores pages. As a workaround, you can easily download notebooks to your computer and upload them again the next time you need ot use them. However, you do not need to save your notebooks until we start coding the rock-paper-scissors game.

Access JupyterLite

For video instructions please check the Getting Python page.

  1. Navigate to the Try Jupyter Home Page
  2. Scroll down to the Applications section as in the image below:
    Applications section of try jupyter page with three options, JupyterLab, Jupyter Notebook and Voila
  3. Click JupyterLab (the first box). This will open the page below with a left navigation section containing notebooks and folders and an introductory Notebook sample (intro.ipynb) already open. You can ignore the files and folders for now. We will just work on our own JupyterLite Notebook. You could use one of the samples, but I find it easier to start on a fresh page.
  4. JupyterLab online with intro notebook open

Create a new notebook

There are a couple of ways to create a notebook. The first option is:

Option 1

  1. Close the strong Intro.ipynb notebook by clicking the x next to the notebook name at the top
    Close a Notebook in JupyterLab with JupyterLite
  2. A Launcher will appear in place of the introductory notebook. Go to the Notebook section of the Launcher and click the Python (Pyodide) option
    JupyterLab Launcher in JupyterLite
  3. This will open a blank notebook titled Untitled1.ipynb (you can find the name at the top of the notebook and in the left navigation section)
    New blank notebook in JupyterLab with JupyterLite

Option 2

Another way to create a new notebook is:

  1. Right click on any empty space in the left navigation bar
  2. A pop-up will appear; click New Notebook
    Applications section of try jupyter page with three options, JupyterLab, Jupyter Notebook and Voila
  3. Another pop-up will appear; check that Python (Pyodide) is selected as the Kernel and click Select
    Applications section of try jupyter page with three options, JupyterLab, Jupyter Notebook and Voila

Rename the notebook

  1. Right click on the name of your notebook ‘Untitled1.ipynb’ in the top tab (you can also right click it from the left navigation and a few more options will appear in the next step)
  2. Click Rename Notebook…in the options that pop up. (Note that there are other options like deleting a notebook etc.)
    Rename Jupyter Notebook
  3. Replace Untitled1 with a name of your choice. We chose “DSP Lesson 1” (deleting the “.ipynb” extension does not seem to matter).
    Rename Jupyter Notebook
  4. Click Rename

You are ready to start coding now!

Download and upload notebooks

This can be a workaround for saving your notebooks since you cant do it in the browser.

To download the notebook, click File in the top navigation bar, then click Download

Download a Notebook from JupyterLite

To upload the notebook, click the upload file icon in the top section of the left navigation bar.

Upload a Notebook to JupyterLite
Then navigate to the notebook you want to upload. Once uploaded, the file will appear in the left navigation panel and you can open it from there.

Anaconda Cloud

What is Anaconda Cloud?

Anaconda, the desktop app, is an easy way to install python, jupyter, other IDE's and packages needed for data science on your computer, all at once. Anaconda Cloud is a platform to code in Jupyter Notebook (JupyterLab) online. It has free and paid versions, the free version is enough for this course. It also looks similar to the Project Jupyter version you can install on your computer.

No setup needed, but you do need to create an account to access Anaconda Cloud. Good thing is you can save your files. Anaconda Cloud also has courses available with the paid version (this is not an endorsement, we have not taken any of the courses, just letting you know that they exist).

Create a free Anaconda account

  1. Navigate to the Anaconda Home Page
  2. Click on the button that says Start Coding Now (bottom left) as in the image below:
    Anaconda home page
  3. This will take you to the 'code in the cloud' page to create a new anaconda account. Enter the information required and click Get Started.
  4. Anaconda code in the cloud registation page
    ***Note after I did this, I got an error message. But when I signed in, it worked. If you get an error to give that a try first. You can find instructions on how to sign in, in the next section below.
  5. If you did not get an error from creating an account, you are likely now in your Anaconda Cloud home page as in the image below. You may be prompted to enter some more information, after that you can skip to step 4 in the next section.
  6. Anaconda code in the cloud registation page
    ** Verify your account if prompted. My prompt was just below the top navigation bar.

Open Anaconda Cloud Notebooks

  1. Click Notebooks in the top navigation bar.
  2. Anaconda code in the cloud registation page
  3. This will open JupyterLab in a new tab as below.
    Anaconda Cloud JupyterLab

Create a new notebook

There are multiple ways to create a notebook. The easiest at this point is option 1.

Option 1

  1. Go to the Notebook section of the Launcher and click the anaconda-panel-YYYY.MM-py###. In my case its "anaconda-panel-2023.05-py310", but it may be different for you. The numbers represent the version date, where YYYY.MM is the year month and ### is the python version. You can select the one with the most recent data and the most recent (highest) python version number.
    Anaconda Cloud launch new notebook
  2. This will open a blank notebook titled Untitled.ipynb (you can find the name at the top of the notebook and in the left navigation section)
    New blank notebook in JupyterLab with Anaconda Cloud Launcher

Option 2

Another way to create a new notebook is:

  1. Right click on any empty space in the left navigation bar
  2. A pop-up will appear; click New Notebook
    New notebook popup in JupyterLab sidebar with Anaconda Cloud
  3. Your new notebook will appear along with another pop-up for kernel selection. Check that anaconda-panel-YYYY.MM-py### is selected as the kernel, where YYYY.MM is the most recent year month and ### is the highest number available.
    Select kernel in Anaconda Cloud

Rename the notebook

  1. Right click on the name of your notebook ‘Untitled1.ipynb’ in the top tab (you can also right click it from the left navigation and a few more options will appear in the next step)
  2. Click Rename Notebook…in the options that pop up. (Note that there are other options like deleting a notebook etc.)
    Rename Jupyter Notebook
  3. Replace Untitled1.ipynb with a name of your choice. We chose “DSP Lesson 1.ipynb”
    Rename Jupyter Notebook
  4. Click Rename

You are ready to start coding now!

Sign in to Anaconda Cloud

This is for the next time you need to access Anaconda Cloud Notebooks.

  1. Navigate to the Anaconda Cloud home page.
  2. Click Sign In, top right section of the top navigation bar and it will take you to a login page.
    Anaconda home page
  3. Sign in with your credentials. This will take you to your Anaconda Cloud home page.

Next step

Learn how to run Python in JupyterLab by using Python as a calculator.