Jupyter Notebook
Jupyter Notebook is an open-source web application. As it is web application, you can create new notebook document and access existing document using web browser.Notebook documents are combination of code, visualization and markup/text. As you can embed explaination using markup within executable codes, it will have more readability. Jupyter notebook supports Python, R and Julia. You can refer jupyter for more information.
Ubuntu
Ubuntu is an open source Linux based Operating System.It is very popular among developers comunity.Ubuntu Desktop is easy to install and it requires very optimal resource. It has lots of pre-installed developers tools.Many developers prefer Python on Ubuntu.It is really easy to set up python on ubuntu. Also some of the third party libraries for python are easy to configure on ubuntu. To learn more information about ubuntu, please refer Ubuntu Desktop for Developers
Oracle VM VirtualBox
Oracle VM VirtualBox is an open-source. It’s basically allow cross-platform virtualization. In VirtualBox, you can install multiple operating systems and run those operating systems simultaneously. Oracle VM can be installed in many operating systems e.g. Windows, Linux, macOS etc. You can find more details on VirtualBox

This tutorial will walk you through how to install Jupyter on Ubuntu Linux. Intially we will be installing Ubuntu in Oracle VM VirtualBox. Then we will configure Jupyter Notebook on Ubuntu. If you are learning or implementing Data Science/Machine Learning techniques, this is good starting point.

Step 1 - Download and Install VirtualBox


  • First you need to download and install a VirtualBox that is appropriate for your Operating System.
  • Go to this website Download VirtualBox, There are several VirtualBox platform packages will be available. As I am using windows machine, Windows hosts.
  • Now double click on the installer and follow the instruction, it is easy.

Step 2 - Install Ubuntu on Oracle VM VirtualBox


  • In this step, you need to download Ubuntu Desktop and install that in VirtualBox.
  • Go to this website Download Ubuntu Desktop, Download Ubuntu latest release. When I downloaded, during that time ubuntu-20.04.1 was latest.
    • Open “Oracle VM VirtualBox” app from start menu.
    • Go to Machine –> New from the top menu

      Virtual Machine initialization

    • “Create Virtual Machine” window will appear. You need to specify a any name, I simply put “ubuntu”. From “Type” drop down select “Linux”. From version downdown select “Ubuntu(64-bit)”. Click Next…

      creating new Virtual Machine for ubuntu installation

    • Next Step, select the Memory size. By default it will appear 4 MB, I selected 8192 MB. It depends on your machine configuration. Click Next…
    • Now create a Virtual Hard Disk. We will be using this virtual Hard Disk for installation.
    • Select VDI(VirtualBox Disk Image) as Hard disk file type. Click Next….

      Virtual Hard Disk creation for ubuntu installation

    • Select “Dynamically allocated” option on “Storage on physical hard disk” window. Click Next….
    • Now, select the size of the Hard disk that we are going to create. This size is the limit of data that virtual machine can hold. Click Create…
    • New machine named “ubuntu” will appear on left side.
    • Right click on newly created machine. Then go to the settings.
    • Select “Storage” from left panel. In Storage Devices, you can “Controller:IDE” . Under “Controller:IDE”, select the Empty Disk image.
    • On the right panel, you can see a little disk icon. From the please choose the disk image that you have downloaded (e.g. ubuntu-20.04.1-desktop-amd64.iso). Click OK…

      ubuntu installation prerequisite settings

    • Start installation.

Step 3 - Install Python and Jupyter Notebook on Ubuntu


  • After successful installation, Start Ubuntu Machine in VirtualBox.
  • Open terminal.
  • update Ubuntu with latest packages.
      sudo apt update
    

    updating ubuntu latest packages

  • Let’s install Python now.
    sudo apt install python3-pip python3-dev
    

    installing python on ubuntu

    sudo -H pip3 install --upgrade pip
    sudo -H pip3 install virtualenv
    

    Creating python virtual environment for jupyter

  • In this step, we will set up python virtual environment. It will basically create a lightweight virtual environment. This virtual environment is isolated and it can maintain its own python binary and site directories.
      mkdir ~/my_project_home
      cd ~/my_project_home
      virtualenv my_project_env
      source my_project_env/bin/activate
  • Now, let’s install Jupyter
      sudo pip install jupyter
  • Finally, it’s time to run Jupyter.
        jupyter notebook
    

    launching jupyter notebook on web browser

Conclusion

If you see the jupyter application is opening in your web browser, that means you have successfully installed jupyter on Ubuntu. In this tutorial, we learned below topics,

  • How to install Oracle VM VirtualBox in windows operating system.
  • How to install and configure Ubuntu on Oracle VM VirtualBox.
  • How to install python on Ubuntu Linux.
  • How to install jupyter on Ubuntu Linux.