How To Install Jupyter 4.1 on Ubuntu 18.04 LTS

Install Jupyter on Ubuntu 18

Jupyter Notebook is an open-source web application used for creating and sharing documents which have the live code, equations, visualizations and explanatory text. It includes data cleaning and transformation, numerical simulation, statistical modeling, machine learning, etc.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Jupyter notebook on an Ubuntu 18.04 Bionic Beaver server.

Install Jupyter on Ubuntu 18.04 LTS

Step 1. First, make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Python 3 and Pip.

Before installing Jupyter is to add all the required dependency packages to your system:

apt install python3 python3-pip python3-dev

To verify that everything went well, let us check the Python & PIP version with these commands:

python3 --version
pip3 --version

Step 3. Installing IPython and Jupyter Notebook

Run the following commands to install IPython & Juptyr on our machine:

apt install ipython
pip3 install jupyter

Before we start the application, we will create a new user for Jupyter Notebook because it is not recommended to run the application as user root:

useradd -M jupyter

Finally, start Jupyter Notebook in the background as the newly created ‘jupyter’ using the following command:

su - jupyter -c 'jupyter notebook --ip IP_Address --no-browser' &

You will receive an output similar to the following:

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://IP_Address:8888/?token=7f928e48351e58492d1bmwe4671ff846fd87b98godetb1171f6

Step 4. Accessing Jupyter.

Jupyter will be available on HTTP port 8000 by default. Open your favorite browser and navigate to http://your-domain.com:8000 or http://server-ip:8000/

Congratulation’s! You have successfully installed Jupyter. Thanks for using this tutorial for installing Jupyter notebook on your Ubuntu 18.04 LTS system. For additional help or useful information, we recommend you to check the official Jupyter web site.

How To Install Django on Ubuntu 18.04 LTS – Step by Step

Install Django on Ubuntu 18

Django is a popular Python framework for writing web applications. Web frameworks like Django provide a set of tools which helps the developer to write the application faster as the framework takes care of the internal structure, thus the developer needs to take care of the application development only. Django is free and open source software.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Django on an Ubuntu 18.04 (Bionic Beaver) server.

Install Django on Ubuntu 18.04

Step 1. First, make sure that all your system packages are up-to-date

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Python 3 and venv.

Now you can install pip using the following command:

sudo apt install python3-venv

Next, Creating Virtual Environment:

mkdir my_django_app
cd my_django_app

Once inside the directory, run the following command to create your new virtual environment:

python3 -m venv venv

To start using this virtual environment, you need to activate it by running the activate script:

source venv/bin/activate

Step 4. Installing Djanggo with pip install

Once the pip is installed, run the following command to install Django:

sudo pip install django

To verify the Django version, run:

python -m django --version

Step 5. Create a sample Django project.

Now that the Django framework has been installed, you can to give it a test drive by creating a sample project:

cd ~
django-admin startproject mysite

The command above will create a directory myproject in your working directory ~, and store all necessary files within.

Run the commands below in sequence to get your application started. Follow the instructions on screen to provide the superuser’s credentials:

cd myidproject/
python3 manage.py migrate
python3 manage.py createsuperuser
python3 manage.py runserver

Step 6. Accessing Django.

Django will be available on HTTP port 8080 by default. Open your favorite browser and navigate to http://yourdomain.com:8000 or http://server-ip:8000/admin
Django-installation

Congratulation’s! You have successfully installed Django. Thanks for using this tutorial for installing Django web framework on Ubuntu 18.04 Bionic Beaver server. For additional help or useful information, we recommend you to check the official Django web site.

How To Install Python 3 on Ubuntu 16.04 LTS

Install Python 3 on Ubuntu 16

Python is an open-source and beginner-friendly programming language. Ubuntu 16.04 and Ubuntu 16.10 come with two versions of Python, Python 2.7 and Python 3.5. At the time of this writing, the latest stable version of Python is 3.6, released on December 23rd, 2016. If you need to use python3 as part of Python application dependency, there are several ways to install python3 on Ubuntu 16.04 LTS.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Python 3 on a Ubuntu 16.04 (Xenial Xerus) server.
Install Python 3 on Ubuntu 16.04 LTS

Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.

sudo apt-get update
sudo apt-get upgrade

Step 2. Installing Python 3.

Method 1. Install Python 3.6 on Ubuntu 16.04 from PPA.

You can install Python 3.6 on Ubuntu 16.04 using this PPA:

sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt update
sudo apt install python3.6

You can check python version on Ubuntu from command line:

python --version

Method 2. Installing Python 3.6 on Ubuntu 16.10 from Repository

Use the following command to install Python 3:

sudo apt update
sudo apt install python3.6

Then check the Python version:

python3.6 -V

Method 3. Compile and Install Python 3.6 on Ubuntu 16.04

First, we need to install some build dependencies using the commands below:

sudo apt install build-essential checkinstall
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

Then, download Python 3.6 from source:

wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
tar xvf Python-3.6.0.tar.xz

Now cd into the source directory, configure the build environment and install:

cd Python-3.6.0/
./configure
sudo make altinstall

Once the process is complete, we can check the version of Python 3 that is installed in the system by typing:

python3.6

Congratulation’s! You have successfully installed Python. Thanks for using this tutorial for installing Python 3 on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Python web site.