Jupyter notebook introduction, installation and use tutorial

1. Introduction to jupyter notebook

1 Introduction

        Jupyter Notebook is a web-based application for interactive computing. It can be applied to the whole process of calculation: development, document writing, running code and displaying results. In short, Jupyter Notebook is opened in the form of a web page. You can write and run the code directly on the web page, and the running result of the code will also be displayed directly under the code block. If you need to write a description document during the programming process, you can write it directly on the same page, which is convenient for timely description and explanation.
        For details, please check the official document: Jupyter Notebook official introduction

2. Components

1) Web application
        Web application is based on the form of a web page, which combines tools for writing description documents, mathematical formulas, interactive calculations and other rich media forms. In short, web applications are tools that can implement various functions.

2) Documents
        All interactive operations, writing instructions, mathematical formulas, pictures, and rich media input and output in Jupyter Notebook are embodied in the form of documents. These documents are saved as a suffix .ipynbof the JSONfile format, version control is not only easy, but also easy to share with others. In addition, the document can also be exported to: HTML, LaTeX, PDF and other formats.

3. Main features

① It has the functions of syntax highlighting, indentation and tab completion during programming.
② You can run the code directly through the browser, and display the running result under the code block.
③ Display calculation results in rich media format. Rich media forms include: HTML, LaTeX, PNG, SVG, etc.
④ Support Markdown grammar when writing documentation or sentences for code.
⑤ Support the use of LaTeX to write mathematical descriptions.

Two, jupyter notebook installation

1. Installation prerequisites

        The prerequisite for installing Jupyter Notebook is to install Python (version 3.3 and above, or version 2.7).

2. Install using Anconda

        If you are a novice, then it is recommended that you install Anaconda to solve the installation problem of Jupyter Notebook, because Anaconda has automatically installed Jupyter Notebook and other tools for you, as well as more than 180 scientific packages and their dependencies in python.
        If you are not familiar with the installation and use of Anaconda, you can         download another article of mine: Introduction, installation and use
of Anaconda. Normally, Jupyter Notebook has been automatically installed for you when the Anaconda distribution is installed, but if not automatically Install, then enter the following commands in the terminal ("Terminal" of Linux or macOS, "Anaconda Prompt" of Windows, hereinafter referred to as "Terminal").

conda install jupyter notebook

3. Install using pip command

        If you are an experienced Python player, you can install Jupyter Notebook through the pip command (the next commands are entered in the terminal).

1) Upgrade pip to the latest version

● Python 3.x

pip3 install --upgrade pip

● Python 2.x

pip install --upgrade pip

● Note: The old version of pip may face the problem of unable to synchronize the installation of dependencies during the installation of Jupyter Notebook. Therefore, it is strongly recommended to upgrade pip to the latest version first.

2) Install Jupyter Notebook

● Python 3.x

pip3 install jupyter

● Python 2.x

pip install jupyter

Guess you like

Origin blog.csdn.net/Roaddd/article/details/112959456