Install Jupyter Notebook and customize the file location

Install Anaconda

Click to enter the download Anaconda page

insert image description here
Click DownLoad or pull down to see the installation package downloads of various systems
(my computer is windos 64 bits, so I downloaded the installation package in the red box)
insert image description here

Wait for a while, after the download is complete, click the installation package, click 'next',
insert image description here
click "I Agree"
insert image description here
permission to choose (I choose the default) click "next"
insert image description here
to install the directory, the default installation is on the c drive, if necessary, click "Browse" to choose the installation path (I chose to install it in the Anaconda3 folder under the F drive)
insert image description here
Click "next" and wait for the installation

set environment variables

Right-click and select Computer->Properties->Advanced System Settings->Advanced->Environment Variables
insert image description here
On the user variable, create a new user variable variable
name: python
variable value:
F:\Anaconda3\Library\bin;
F:\Anaconda3\Scripts;
F:\Anaconda3;
(There will be differences here depending on the location of the previous installation, you can directly click on the folder, right click -> Properties -> Installation -> object name copy path, the three file paths need to be followed by English semicolons "; ")
insert image description here
Click "OK", the environment variable configuration is complete

Open the Jupyter notebook

Open cmd, shortcut key win+r, command line input (if it has been opened before, close it again and open it again)

jupyter notebook

insert image description here
Automatically open the default browser. If you need to add a password (password) when you open it for the first time, the password is empty, just click "login in"
insert image description here

custom file location

Enter in cmd

jupyter notebook --generate-config

Find the corresponding location and open the jupyter_notebook_config.py file, search

c.NotebookApp.notebook_dir

insert image description here
After removing "#", add a custom file location in ' ' (I put it under the jupyter notebook file on the F drive)
insert image description here

appendix:

1. It should be noted that Jupyter notebook can only open the data set in the current directory, such as csv, so you need to use upload to import the data set into the current directory. insert image description here
2. For ease of use, send jupyter-notebook.exe to the desktop in Scripts in the Anaconda3 directory, and then double-click the exe file to use jupyter notebook (my exe file is located under F:\Anaconda3\Scripts)
insert image description here

3. If the following situation occurs,
insert image description here
check whether cmd is closed
insert image description here

Guess you like

Origin blog.csdn.net/skybulex/article/details/107337999