introduce

JupyterLab is an interactive web-based development environment and the next generation Notebook interface of Jupyter.

Notebooks of Jupyter (.ipynb), edit text (.md,.csv,.json…) , view files (images, PDF…) , operation terminal, etc.

In addition,

  • Interactive refers to the interaction between text and code. Means that code in text, such as the Markdown snippet, can be run directly.
  • The development environment, which indicates that it is powerful enough, is more like an IDE. Extensions also allow us to customize or enhance various functions.

The official document: jupyterlab. Readthedocs. IO /

The installation

One of the following two methods is recommended:

  • Anaconda: Anaconda is a Python distribution for scientific computing, including JupyterLab.
  • Docker: Docker is an open source container engine that can pull JupyterLab image environment directly.

Anaconda

Download address: www.anaconda.com/products/in…

Conda view:

❯ conda list | grep jupy
jupyter                   1.0.0                    py37_7
jupyter_client            5.3.4                    py37_0
jupyter_console           6.1.0                      py_0
jupyter_core              4.6.1                    py37_0
jupyterlab                1.2.6              pyhf63ae98_0
jupyterlab_server         1.0.6                      py_0
Copy the code

Installation:

conda install -c conda-forge jupyterlab
Copy the code

Or update:

conda update -c conda-forge jupyterlab
Copy the code

Begin to use

jupyter lab
Copy the code

The browser will open:

Docker

Download address: docs.docker.com/engine/inst…

Pull mirror:

docker pull jupyter/scipy-notebook:latest
Copy the code

Resident operation:

docker run -d --restart=always \
--name jupyter \
-p 8888:8888 \
-e JUPYTER_ENABLE_LAB=yes \
-v "$HOME":/home/jovyan/work \
jupyter/scipy-notebook:latest
Copy the code
  • --restart=alwaysTo keep running after a restart
  • $HOMEIs the local working path used to map into the container

The browser to http://localhost:8888/lab:

You can view the jupyter logs to obtain the Token.

❯ docker logs jupyter
Executing the command: Jupyter Lab [I 22:32:45.229 LabApp] Writing Notebook Server cookie Secret to /home/jovyan/local/ share/jupyter/runtime/notebook_cookie_secret [I 22:32:46. 051 LabApp] JupyterLab extension the loaded from / opt/conda/lib/python3.8 / site - packages/jupyterlab [I 22:32:46. 051 LabApp] jupyterlab application directory is / opt/conda/share/jupyter/lab/I 22:32:46. 054 LabApp Serving notebooks fromlocalDirectory: /home/jovyan [I 22:32:46.054 LabApp] Jupyter Notebook 6.1.4 is running at: [I 22:32:46. 054 LabApp] http://e1839b94c616:8888/? Token = fc8d547d3d9cb47ae8d855fbb3f788e0c045e0061012a917 [I 22:32:46. 054 LabApp] or http://127.0.0.1:8888/? Token = fc8d547d3d9cb47ae8d855fbb3f788e0c045e0061012a917 [I 22:32:46. 054 LabApp] Use Control - to stop this server and C Shut down all kernels (twice to skip confirmation). [C 22:32:46.059 LabApp] access the notebook, open this filein a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/nbserver-6-open.html Or copy and paste one of these URLs: http://e1839b94c616:8888/? Token = fc8d547d3d9cb47ae8d855fbb3f788e0c045e0061012a917 or http://127.0.0.1:8888/? token=fc8d547d3d9cb47ae8d855fbb3f788e0c045e0061012a917Copy the code

In the end, the input token fc8d547d3d9cb47ae8d855fbb3f788e0c045e0061012a917 login.

Chrome allows you to create desktop shortcuts using Chrome Apps.

More images

  • Selecting an Image: jupyter – docker – sports. Readthedocs. IO/en/latest/u…

The plug-in

To enable the

JupyterLab sidebar has plug-in options, open will prompt “Enable”, you can confirm.

The installation

SEARCH for the desired plugin in “SEARCH”. For example, DrawIO:

After installing the Launcher Other, there will be more Diagram in the Launcher Other. Open edit:

More plug-in

  • Awesome JupyterLab

conclusion

Welcome to GoCoding official account to share practical tips and knowledge in daily Coding!