目录

目录

  1. 安装Jupyter notebook

    SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
  2. 启动Jupyter notebook

  3. 文件管理

  4. 基本的操作与概念

  5. 常用快捷键

(一)安装Jupyter notebook

1.在控制台输入:

pip install jupyter

2.注意:

很多网上的教程推荐安装Anoconda,本文章讲的是已经安装了python解释器,在不安装>Anoconda的情况下,自已独立的安装ipython和jupyter.
本人自认为,Anoconda是比较好,不过还是喜欢轻量级的包,和自己管理包,自己才清楚用哪些包。

3.安装的过程:

(1)安装前的库

1.1Jupyter notbook 的使用 Python 第1张

(2)安装jupyter

1.1Jupyter notbook 的使用 Python 第2张

(3)安装后的包

1.1Jupyter notbook 的使用 Python 第3张

(4)注:安装的依赖库

安装jupyter后,会自动安装其他依赖库,其依赖库多达20多个,其中包括ipython,不过相对于Anoconda的七八百个库,自己安装jupyter的体积还是比较小的。

(二)启动Jupyter notebook

1.在命令行输入:

jupyter notebook

1.1Jupyter notbook 的使用 Python 第4张

2.打开的首页:

会自动打开浏览器(在网页端编写代码)

1.1Jupyter notbook 的使用 Python 第5张

(三)文件管理

1.选择文件的保存路径

1.1Jupyter notbook 的使用 Python 第6张

1.1Jupyter notbook 的使用 Python 第7张

2.增加文件夹

1.1Jupyter notbook 的使用 Python 第8张

3.删除与修改文件

1.1Jupyter notbook 的使用 Python 第9张

4.创建python笔记

1.1Jupyter notbook 的使用 Python 第10张

5.修改笔记的标题

1.1Jupyter notbook 的使用 Python 第11张

(四)基本概念与操作

1.什么是Cell?

1.1Jupyter notbook 的使用 Python 第12张

2.命令状态与编辑状态

(1)当Cell的边框为绿色时,是编辑状态

1.1Jupyter notbook 的使用 Python 第13张

(2)当Cell的边框为蓝色时,是命令状态

1.1Jupyter notbook 的使用 Python 第14张

3.代码与笔记模式

(1)Code模式,在Cell前有[in] 标记

1.1Jupyter notbook 的使用 Python 第15张

(2)Markdown模式,在Cell前无[in] 标记

1.1Jupyter notbook 的使用 Python 第16张

4.显示行号

1.1Jupyter notbook 的使用 Python 第17张

5.输出不同的文件格式

1.1Jupyter notbook 的使用 Python 第18张

6.在Pycharm里使用Jupyter

(1)新建jupyter文件

1.1Jupyter notbook 的使用 Python 第19张

(2)提示输入端口

当我们点击运行的时候,会提示我们输入jupyter网页的端口,可以是网页端的,也可以是本地的。

1.1Jupyter notbook 的使用 Python 第20张

(3)启动jupyter,复制到弹出框

1.1Jupyter notbook 的使用 Python 第21张

(4)运行成功

1.1Jupyter notbook 的使用 Python 第22张

(五)常用快捷键

1.查看快捷键

1.1Jupyter notbook 的使用 Python 第23张

1.1Jupyter notbook 的使用 Python 第24张

2.快捷键

  1. shift + Enter 运行并选中下一行

    一下代码运在命令状态下有效

  2. a 在上面新建一行
  3. b 在下面新建一行
  4. x 或者 dd 删除一行
  5. ESC 退出编辑状态
  6. Enter 进入编辑状态
  7. m Markdown模式(笔记)
  8. y Code模式(代码)

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄