Detailed process - install and start Jupyter notebook

1. Installation

Note : I did n't install Anaconda , and I felt that I needed the tool Jupyter notebook halfway, so I passed it in windowscmd command windowDownload, install and use.

*step1:*Switch path

(If you have not added the Python installation directory to Path, you need to switch to the Scripts directory of the Python installation directory) The details are as follows:
insert image description here

*step2:*Download

Enter pip install jupyter
insert image description here
and wait for the installation to complete~~~

Some may report an error, then switch to the domestic mirror download

pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple/

*step3:*Start Juypter Notebook

Enter in the command window: jupyter notebook insert image description hereThe computer browser automatically opens the Jupyter Notebook window as follows, indicating that the installation is successful:insert image description here

*step4:*Configure Jupyter Notebook

Enter in the CMD command window and jupyter notebook --generate-config
insert image description here
you can see that the user folder has a .jupyter file. Open the configuration file jupyter_notebook_config.py and
insert image description here
insert image description here
find the statement c.NotebookApp.notebook_dir = ' ', and modify it to c.NotebookApp.notebook_dir = 'store jupyter notebook The folder path of the code written in'
insert image description here
Note: delete the preceding #! ! !
If it has not yet taken effect, you can use a shortcut:
![Insert picture description here](https://img-blog.csdnimg.cn/6cc3bfbedd2646e1948bc6ac0f8889b0.png
then right-click the shortcut button, modify the properties of the shortcut button, and change the starting location to the path location you need to store
insert image description here

insert image description here

step5 (optional): Add code auto-completion function

  1. Enter pip install jupyter_contrib_nbextensions in the cmd command window, and wait for the installation to succeed~~~
    insert image description here
    If you encounter a timeout problem, switch to the domestic image download
    pip install jupyter_contrib_nbextensions -i https://pypi.tuna.tsinghua.edu.cn/simple/

  2. After installation, configure nbextension, enter jupyter contrib nbextension install --user --skip-running-check in cmd, and wait for the configuration to succeed~~~(Be careful to close the jupyter notebook first

  3. Then start jupyter notebook, click the option of Nbextension, and check Hinterland to add the code auto-completion function.
    insert image description here
    insert image description here
    Visible success! ! !

Two, start

At this point, click the shortcut to directly enter the Jupyter Notebook window
insert image description here

3. Initial use

insert image description here
Click new to create a new file

insert image description here

Click run to execute step by step, and click the save button to save the file.
insert image description here
Jupyter notebook can also edit text
insert image description here

Guess you like

Origin blog.csdn.net/qq_46304554/article/details/128558270