venv
module installed on the server. Do this by following Steps 1 and 2 of our tutorial on How To Install Python 3 and Set Up a Local Programming Environment on Ubuntu 18.04.my_env
”, but you should feel free to rename it.No web browser found
warning. This is to be expected, since the application is running on a server and you likely haven’t installed a web browser onto it. This guide will go over how to connect to the Notebook on the server using SSH tunneling in the next section.CTRL+C
followed by y
, and then pressing ENTER
to confirm:exit
command:8888
, by default) to a port on your local computer.ssh
is the standard command to open an SSH connection, but when used with the -L
directive, you can specify that a given port on the local host (that is, your local machine) will be forwarded to a given host and port on the remote host (in this case, your server). This means that whatever is running on the specified port on the remote server (8888
, Jupyter Notebook’s default port) will appear on the specified port on your local computer (8000
in the example command).8000
to one of your choosing if, for example, 8000
is in use by another process. It is recommended that you use a port greater than or equal to 8000
, as those port numbers are unlikely to be used by another process. Be sure to include your own server’s IP address and the name of your server’s non-root user:http://localhost:8000
. Now that you’re connected to Jupyter Notebook, continue on to Step 4 to learn how to use it.8000
). It is recommended to use a port greater or equal to 8000
as those port numbers are unlikely to be used by another process. If 8000
is used by another process, though, select a different, unused port number. Next, set the destination as localhost:8888
, since port 8888
is the one that Jupyter Notebook is running on. Then click the Add button and the ports should appear in the Forwarded ports field:http://localhost:8000
(or whatever port number you chose), to connect to the Jupyter Notebook instance running on the server. Now that you’re connected to Jupyter Notebook, continue on to Step 4 to learn how to use it..ipynb
file extension) which you populate with any number of individual cells. Each cell holds an interactive text editor which can be used to run code or write rendered text. Additionally, notebooks allow you to write and run equations, include other rich media, such as images or interactive plots, and they can be exported and shared in various formats (.ipyb
, .pdf
, .py
). To illustrate some of these functions, we’ll create a notebook file from the Notebook Dashboard, write a simple text board with an equation, and run some basic Python 3 code.http://localhost:8000
, you will be presented with a login page:jupyter notebook
from your server:CTRL + ENTER
and the following should be the result:CTRL + ENTER
, and the following will be the result: