SoFunction
Updated on 2024-10-29

Python Getting Started jupyter basic operations and text usage

synopsis

Jupyter Notebook is an open source web application that allows users to create and share documents containing code, equations, visualizations and text.

Its uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and more!

basic operation

2.1 windows update pip library

python -m pip install --upgrade pip -i /simple

C:\Users\basketball>python -m pip install --upgrade pip -i /simple
Looking in indexes: /simple
Collecting pip
  Downloading /packages/ca/31/b88ef447d595963c01060998cb329251648acf4a067721b0452c45527eb8/pip-21.2. (1.6 MB)
     |████████████████████████████████| 1.6 MB 1.1 MB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.1.1
    Uninstalling pip-20.1.1:
      Successfully uninstalled pip-20.1.1
Successfully installed pip-21.2.4

2.2 jupyter installation

# Install jupyter
pip install jupyter
#No module named 'x' x shows whatever dependencies need to be installed if there is an error elevation.
pip install maturin
#Install plug-ins to improve efficiency
pip install jupyter_contrib_nbextensions
#Update jupyter
pip install --upgrade jupyter

2.3 Starting jupyter for the first time

# Press windows key + r and type :jupyter-notebook
#google browser Enter: 127.0.0.1:8888 or localhost:8888

Seeing this page is successful!

在这里插入图片描述

2.4 Setting a password to enter jupyter

C:\>CD jupyter
C:\jupyter>    
#windows commands to create files
C:\jupyter>jupyter notebook --generate-config                 # Generate files
C:\jupyter>jupyter notebook password                          #Set password
x x x x

# or view token input login
C:\jupyter>jupyter notebook list    

# Run jupyter again

E:\>jupyter notebook
[W 21:12:13.097 NotebookApp] Terminals not available (error was No module named '')
[I 21:12:13.099 NotebookApp] Serving notebooks from local directory: E:\
[I 21:12:13.099 NotebookApp] Jupyter Notebook 6.4.3 is running at:
[I 21:12:13.102 NotebookApp] http://localhost:8888/
[I 21:12:13.102 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

在这里插入图片描述

Seeing this page is a success!!!

3. Create a jupyter text

在这里插入图片描述

在这里插入图片描述

Usage of text

4.1 Saving and downloading text

在这里插入图片描述

4.2 Running and switching code

在这里插入图片描述

在这里插入图片描述

4.3 Multiple code runs

在这里插入图片描述

Above is the python beginner - jupyter basic operation and text usage of the details, more information about python beginner please pay attention to my other related articles!