Step-by-step tutorial on installing jupyter

python37 download: https://blog.csdn.net/weixin_44727274/article/details/126017386
Environment management: https://zhuanlan.zhihu.com/p/444449860

The first step is to check whether your python version is python37

1. Check the python version:

Insert image description here
2. Why the python37 version?

Because Python version 37 or above will have various installation library error reports.

If you are not python37, uninstall it as soon as possible, otherwise the road ahead will be difficult for you. (Download the installation package and ask your teacher for it)

3. To install python37, you must open it as an administrator!

3-1. Special emphasis is placed here on the [Run as Administrator] file

Right-click and open as administrator:
Insert image description here
3-2. Otherwise, the following items cannot be displayed and can be checked:

Insert image description here

Just keep clicking next step below.

The second step is to install jupyter

1. Update the pip library first

Terminal command: python -m pip install pip==20.0.1 -i https://pypi.tuna.tsinghua.edu.cn/simple/

Insert image description here

Tip: Just copy and paste it into the terminal. Do not enter letters one by one manually.

(1) Why update pip first? Because jupyter can be installed only with a newer version of pip

(2) Why am I prompted to update pip? There is no need to worry about this prompt to update, because the latest pip is not the best pip, and pip20.0.1 version is very stable.

Insert image description here

2. Install jupyter again

Continue to execute the command in the terminal: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter

After installation is complete

3. Jupyter testing and error reporting

3-1.jupyter test

(1) Enter jupyter notebook in the terminal and press Enter

(2) Copy one of these three URLs to Google Chrome

Insert image description here

(3) Create a new jupyter file
Insert image description here
(4) Enter print('hello world') to print a message indicating that the jupyter installation is completely successful.
Insert image description here

3-2. Jupyter reports errors (students who do not report errors do not need to read it)

(1)The first error report
Insert image description here

Because the version is not correct, you can use this command in the terminal and press Enter to solve the problem: pip install jupyter-client==6.1.12 -i https://pypi.tuna.tsinghua.edu.cn/simple/

(2) The second error
Insert image description here
is also a version problem. You can solve it by using this command in the terminal and pressing Enter: pip install pyzmq==19.0.2 -i https://pypi.tuna.tsinghua.edu.cn/simple

The third step is to expand the jupyter plug-in in vscode

1. Install the jupyter plug-in
Insert image description here
2. Open a working folder

Insert image description here
3. For example, select the newly created [python course code] on the desktop.
Insert image description here
4. Click [New File]
Insert image description here

5. The named file must have .ipynb
Insert image description here

6. Test print('hello world'), it can be run and used.

Insert image description here

Guess you like

Origin blog.csdn.net/weixin_40981660/article/details/119975055