Jupyter Notebook installation (Windows)
1. Download Jupyter Notebook
(1) Open cmd (if you did not add the Python installation directory to Path, you need to switch to the Scripts directory of the Python installation directory, but most Python installation tutorials will have this step);
(2) Input pip install juypter
;
2. Start Juypter Notebook
(1) Input in the command line window jupyter notebook
;
At the same time, the default browser will open the Jupyter Notebook window, indicating that the Jupyter Notebook installation is successful.
3. Configure Jupyter Notebook
(1) Enter in the command line window jupyter notebook --generate-config
, you will find an extra configuration file under C:\Users\Username\.jupyter jupyter_notebook_config.py
;
(2) Open this configuration file and find the following sentence #c.NotebookApp.notebook_dir = ''
.
You can modify it to c.NotebookApp.notebook_dir = 'D:\jupyter-notebook'
, of course, the specific directory is determined by the folder you create (you need to create it yourself).
After the configuration file is modified, the code written in the jupyter notebook will be saved in this directory. Now restart jupyter notebook and enter the new working directory;
4. Add code auto completion function (optional)
(1) Open cmd, enter pip install jupyter_contrib_nbextensions
, and wait for the installation to succeed;
(2) After installation, you need to configure nbextension (make sure you have closed jupyter notebook before configuration), enter it in cmd, jupyter contrib nbextension install --user --skip-running-check
and wait for the configuration to succeed;
(3) When the first two steps are successful, start jupyter notebook, and you will find that there is an additional option for Nbextension in the option bar. Click this option and check Hinterland to add the code auto-completion function.