If you are using a Mac or Linux, the steps for creating an SSH tunnel are similar to the How To Use SSH Keys with DigitalOcean Droplets using Linux or Mac guide except there are additional parameters added in the ssh command. Please refer to the subsection for your local computer. The next two subsections describe how to create an SSH tunnel from 1) a Mac or Linux and 2) Windows. Since Jupyter Notebook is running on a specific port on the Droplet (such as :8888, :8889 etc.), SSH tunneling enables you to connect to the Droplet’s port securely. In this section we will learn how to connect to the Jupyter Notebook web interface using SSH tunneling. Step 4 - Connecting to the Server Using SSH Tunneling To verify that you have python installed: Some of Jupyter’s dependencies may require compilation, in which case you would need the ability to compile Python C-extensions, so we are installing python-dev as well.
Installing python2.7 will update to the latest version of Python 2.7, and python-pip will install Pip which allows us to manage Python packages we would like to use. sudo apt-get -y install python2.7 python-pip python-dev.Next, install Python 2.7, Python Pip, and Python Development: This will ensure that old or outdated packages do not interfere with the installation. In this section we will install Python 2.7 and Pip.įirst, update the system’s package index. Initial Server Setup with Ubuntu 16.04 explains how to add users and give them sudo access. If root access is required for the command, it will be preceded by sudo. Non-root user with sudo privileges ( Initial Server Setup with Ubuntu 16.04 explains how to set this up.)Īll the commands in this tutorial should be run as a non-root user.To follow this tutorial, you will need the following:
For the purposes of this tutorial, Python 2 (2.7.x) is used since many of the data science, scientific computing, and high-performance computing libraries support 2.7 and not 3.0+.
Python) and rich text elements (paragraph, equations, figures, links, etc.) which aid in presenting reproducible research.īy the end of this guide, you will be able to run Python 2.7 code using Ipython and Jupyter Notebook running on a remote server. Jupyter notebooks (or simply notebooks) are documents produced by the Jupyter Notebook app which contain both computer code (e.g. This article will walk you through setting up a server to run Jupyter Notebook as well as teach you how to connect to and use the notebook. Jupyter Notebook offers an interactive web interface to many languages, including IPython. IPython is an interactive command-line interface to Python.