The easiest way to install Python and Jupyter Notebook is probably with Anaconda.

Anaconda is a free and open source distribution of the Python programming language for data science and machine learning related applications, that aims to simplify package management and deployment. Package versions are managed by the package management system conda.

There is a bunch of reasons why it is preferable to use such a thing as Anaconda instead of a traditional Python distributions. For me the most important reason is clearly that there is no risk of messing up your required system libraries.

Install Python with Anaconda

Read the Anaconda documentation to see what the difference between Anaconda and Miniconda

Choose, download and install the one that fits best for your needs:

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod -R 755 Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh

Accept the licence and to prepend the Miniconda3 install location to PATH in your /home/username/.bashrc

Do you wish the installer to prepend the Miniconda3 install location
to PATH in your /home/username/.bashrc ? [yes|no]
[no] >>> yes

Refresh your environment variables

. ~/.bashrc

Check your default python location

which python

Check your Python version

python --version

Anaconda having currently no internal update to 3.7, for upgrading Python being under 3.6 for example, you will have to do something like

conda install python==3.7

Upgrade the packages to the newest version

conda update --all

Anaconda update doesn’t clean automatically older packages, for this we have to use the following command

conda clean -p

Install Jupyter Notebook

conda install -c conda-forge notebook

You can now launch the Jupyter Notebook with:

jupyter notebook

The Jupyter Notebook should open in your web browser.