Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home Google Cloud

How to Set Up Jupyter Notebook on Ubuntu 18.04 in Google Cloud

by Cloudbooklet
5 years ago
in Google Cloud, Compute Engine
How To Set Up Jupyter Notebook On Ubuntu 18.04 In Google Cloud
ShareTweetSendShare
Readers like you help support Cloudbooklet. When you make a purchase using links on our site, we may earn an affiliate commission.

How to Set Up Jupyter Notebook on Ubuntu 18.04 in Google Cloud. Jupyter is an open source software for interactive computing across many programming languages. Jupyter Notebook is a web application which is used to create and share live codes, equations, visualizations. This used in machine learning, data cleaning, numerical simulation, statistical modeling and many […]

ADVERTISEMENT

How to Set Up Jupyter Notebook on Ubuntu 18.04 in Google Cloud. Jupyter is an open source software for interactive computing across many programming languages. Jupyter Notebook is a web application which is used to create and share live codes, equations, visualizations. This used in machine learning, data cleaning, numerical simulation, statistical modeling and many more.

In this guide you are going to learn how to setup Jupyter Notebook on Ubuntu in Google Cloud Platform.

Prerequisites

Your Compute Engine Instance running, see the Setting up Compute Engine Instance.

ADVERTISEMENT

Installation Methods

You can install Jupyter Notebook with two different methods

You might also like

How To Setup Ssh Keys On Ubuntu

How to Setup SSH Keys on Ubuntu 20.04

4 months ago
Draggan Ai Editing Tool Install And Use Draggan Photo Editor

DragGAN AI Editing Tool Install and Use DragGAN Photo Editor

4 months ago
  1. Install using Anaconda. Learn to install Jupyter Notebook using Anaconda
    • If you are installing using Anaconda you can skip the below steps up to creating Firewall rules.
  2. Install with pip
    • If you are installing with pip you need to follow all steps below.

Install required packages

SSH to your Compute Engine instance and begin typing the following commands to start installing Jupyter.

sudo apt install python3-dev python3-pip

Create Python Virtual Environment for Jupyter Notebook

sudo -H pip3 install --upgrade pip
sudo -H pip3 install virtualenv
mkdir ~/myprojectdir
cd ~/myprojectdir
virtualenv myprojectenv

Activate the virtual environment by typing

ADVERTISEMENT
source myprojectenv/bin/activate

Your prompt should change to indicate that you are now operating within a Python virtual environment. It will look something like this: (myprojectenv)username@host:~/myprojectdir$

Install Jupyter Notebook

Now you can install Jupyter Notebook using pip

ADVERTISEMENT
pip install jupyter

Enable Firewall Rule

Once Jupyter Notebook is installed it will run on port 8888. So you need to create a Firewall rule to allow connections on port 8888. So lets create a firewall rule.

Go to Networking >> VPC Networks >> Firewall rules and click Create Firewall rule.

ADVERTISEMENT
  • Enter a name
  • In Targets select All instances in the network
  • In Source IP ranges enter 0.0.0.0/0
  • In Protocols and ports check tcp and enter 8888
  • Click Create

Configure Jupyter Notebook

By default Jypyter Notebook listens on localhost only, so you need to create a configuration to allow external connections.

Generate Configuration

jupyter notebook --generate-config

Now a configuration file will be created in /home/username/.jupyter/jupyter_notebook_config.py

ADVERTISEMENT

Edit the file and find c.NotebookApp.ip and remove the # and replace localhost with 0.0.0.0

sudo nano /home/username/.jupyter/jupyter_notebook_config.py

So the final code will be like this:

c.NotebookApp.ip = '0.0.0.0'

Generate Password

Finally you can secure the application by creating a password.

jupyter notebook password

Enter the password and verify the password.

Test Jupyter Notebook

Now Jupyter Notebook is installed and also created a firewall rule to allow access on port 8888. Now start Jupyter notebook.

jupyter notebook

Visit your IP Address with port 8888 (http://IP_ADDRESS:8888/)on your bowser.

Jupyter Notebook Login

Login using the password you set early.

Jupyter Notebook Dashboard

Now you can write codes, equations, etc on your Jupyter Notebook.

Jupyter Notebook Directory Structure

You can click on Quit button to shutdown Jupyter Notebook server. For more set up and configuration details you can visit official docs here.

Great!

Jupyter Notebook is installed successfully on your Ubuntu 18.04 in Google Cloud.

Tags: AnacondaGoogle Cloud PlatformJupyterPython
ShareTweetSendShare
Cloudbooklet

Cloudbooklet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts

Set Up Deep Learning With Nvidia, Cuda, Cudnn On Ubuntu

How to Set Up Deep Learning with Nvidia, CUDA, cuDNN on Ubuntu 22.04

7 months ago
How To Install Or Upgrade Php 8.2 On Ubuntu 22.04

How to Install or Upgrade PHP 8.2 on Ubuntu 22.04

9 months ago
How To Change Timezone On Ubuntu 22.04

How to Change Timezone on Ubuntu 22.04

1 year ago
How To Install Ansible On Ubuntu 22.04

How to Install Ansible on Ubuntu 22.04

1 year ago

Follow Us

Trending Articles

Cloud Vps Server

Top 10 Advantages of a Cloud VPS Server

September 19, 2023

Best 10 AI Comic Generator: Create Comic book in Seconds

5 Best Fantasy Minecraft Servers in 2023

Microsoft Unveils New Disc-Less Xbox Series X with Lift-to-Wake Controller

Microsoft Surface Event: The Most Exciting and Innovative Launches and Updates

Amazon Prime Big Deal Days 2023: Best Deals

Popular Articles

How To Use Midjourney Vary Region Editor To Create Stunning Images

How to Use Midjourney Vary Region Editor to Create Stunning Images

August 25, 2023

10 Best Gay Dating Apps to Use in 2023

7 Best AI Content Detectors to Check Plagiarism

How to Use Canva on ChatGPT: A Step-by-Step Guide

10 Best AI Summarizer Tools in 2023: A Review and Comparison

10 Best Email Autoresponder Tool for Lead Generation

Subscribe Now

loader

Subscribe to our mailing list to receives daily updates!

Email Address*

Name

Cloudbooklet Logo

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Applications
  • Linux

Cloudbooklet © 2023 All rights reserved.