当前位置:网站首页>数据挖掘-01
数据挖掘-01
2022-07-28 03:40:00 【画个圈圈诅咒你 yebo】
目录
一、JupyterNotebook介绍
①简介
Jupyter Notebook是基于网页的用于交互计算的应用程序。其可被应用于全过程计算:开发、文档编写、运行代码和展示结果。
简而言之,Jupyter Notebook是以网页的形式打开,可以在网页页面中直接编写代码和运行代码,代码的运行结果也会直接在代码块下显示的程序。如在编程过程中需要编写说明文档,可在同一个页面中直接编写,便于作及时的说明和解释。
②组成部分
(1)网页应用
网页应用即基于网页形式的、结合了编写说明文档、数学公式、交互计算和其他富媒体形式的工具。简言之,网页应用是可以实现各种功能的工具。
(2)文档
即Jupyter Notebook中所有交互计算、编写说明文档、数学公式、图片以及其他富媒体形式的输入和输出,都是以文档的形式体现的。
这些文档是保存为后缀名为.ipynb的JSON格式文件,不仅便于版本控制,也方便与他人共享。
此外,文档还可以导出为:HTML、LaTeX、PDF等格式。
③Jupyter Notebook的主要特点
① 编程时具有语法高亮、缩进、tab补全的功能。
② 可直接通过浏览器运行代码,同时在代码块下方展示运行结果。
③ 以富媒体格式展示计算结果。富媒体格式包括:HTML,LaTeX,PNG,SVG等。
④ 对代码编写说明文档或语句时,支持Markdown语法。
⑤ 支持使用LaTeX编写数学性说明。
二、安装Jupyter Notebook
1. 安装
① 安装前提
安装Jupyter Notebook的前提是需要安装了Python(3.3版本及以上,或2.7版本)。
② 使用Anaconda安装
如果你是小白,那么建议你通过安装Anaconda来解决Jupyter Notebook的安装问题,因为Anaconda已经自动为你安装了Jupter Notebook及其他工具,还有python中超过180个科学包及其依赖项。
常规来说,安装了Anaconda发行版时已经自动为你安装了Jupyter Notebook的,但如果没有自动安装,那么就在终端(Linux或macOS的“终端”,Windows的“Anaconda Prompt”,以下均简称“终端”)中输入以下命令安装:
conda install jupyter notebook③ 使用pip命令安装
1. 把pip升级到最新版本
- Python 3.x
pip3 install --upgrade pip- Python 2.x
pip install --upgrade pip- 注意:老版本的pip在安装Jupyter Notebook过程中或面临依赖项无法同步安装的问题。因此强烈建议先把pip升级到最新版本。
2. 安装Jupyter Notebook
- Python 3.x
pip3 install jupyter- Python 2.x
pip install jupyter三、运行Jupyter Notebook
如果你有任何jupyter notebook命令的疑问,可以考虑查看官方帮助文档,命令如下:
jupyter notebook --help或
jupyter notebook -h① 默认端口启动
在终端中输入以下命令:
jupyter notebook执行命令之后,在终端中将会显示一系列notebook的服务器信息,同时浏览器将会自动启动Jupyter Notebook。
启动过程中终端显示内容如下:
$ jupyter notebook
[I 08:58:24.417 NotebookApp] Serving notebooks from local directory: /Users/catherine
[I 08:58:24.417 NotebookApp] 0 active kernels
[I 08:58:24.417 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 08:58:24.417 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).- 注意:之后在Jupyter Notebook的所有操作,都请保持终端不要关闭,因为一旦关闭终端,就会断开与本地服务器的链接,你将无法在Jupyter Notebook中进行其他操作啦。
浏览器地址栏中默认地将会显示:http://localhost:8888。其中,“localhost”指的是本机,“8888”则是端口号。

URL
如果你同时启动了多个Jupyter Notebook,由于默认端口“8888”被占用,因此地址栏中的数字将从“8888”起,每多启动一个Jupyter Notebook数字就加1,如“8889”、“8890”……
② 指定端口启动
如果你想自定义端口号来启动Jupyter Notebook,可以在终端中输入以下命令:
jupyter notebook --port <port_number>其中,“<port_number>”是自定义端口号,直接以数字的形式写在命令当中,数字两边不加尖括号“<>”。如:jupyter notebook --port 9999,即在端口号为“9999”的服务器启动Jupyter Notebook。
③ 启动服务器但不打开浏览器
如果你只是想启动Jupyter Notebook的服务器但不打算立刻进入到主页面,那么就无需立刻启动浏览器。在终端中输入:
jupyter notebook --no-browser此时,将会在终端显示启动的服务器信息,并在服务器启动之后,显示出打开浏览器页面的链接。当你需要启动浏览器页面时,只需要复制链接,并粘贴在浏览器的地址栏中,轻按回车变转到了你的Jupyter Notebook页面。

例图中由于在完成上面内容时我同时启动了多个Jupyter Notebook,因此显示我的“8888”端口号被占用,最终分配给我的是“8889”。
边栏推荐
- The wonderful use of asemi rectifier bridge GBPC3510 in DC brush motor
- ES6 从入门到精通 # 09:Symbol 类型
- 贪心——122. 买卖股票的最佳时机 II
- Qt:QMessageBox消息框、自定义信号和槽
- 【OPENVX】对象基本使用之vx_image
- Daily practice ----- realize the lottery function of two-color ball. Rules: Six non repeating numbers are randomly selected from 36 red balls, and one from 15 basketball is randomly selected to form a
- TypeError: ufunc ‘bitwise_and‘ not supported for the input types, and the inputs could not be safely
- Unity backpack system
- leetcode刷题:动态规划09(最后一块石头的重量 II)
- In depth introduction to sap ui5 fileuploader control - why do you need a hidden iframe trial
猜你喜欢

Tungsten Fabric SDN — BGP as a Service

单调栈——42. 接雨水——面大厂必须会的困难题

什么是Tor?Tor浏览器更新有什么用?

Unity backpack system
![2022-07-27: Xiao Hong got an array arr with a length of N. she is going to modify it only once. She can modify any number arr[i] in the array to a positive number not greater than P (the modified numb](/img/24/fbf63272f83b932e0ee953f8d4db75.png)
2022-07-27: Xiao Hong got an array arr with a length of N. she is going to modify it only once. She can modify any number arr[i] in the array to a positive number not greater than P (the modified numb

构建“产业大脑”,以“数字化”提升园区运营管理及服务能力!

tensorboard使用记录

MSGAN用于多种图像合成的模式搜索生成对抗网络---解决模式崩塌问题

AI chief architect 12 AICA Baidu OCR vertical large-scale landing practice

95后阿里P7晒出工资单:真的是狠狠扎心了...
随机推荐
Animation
【论文笔记】基于深度学习的移动机器人自主导航实验平台
verticle-align行内元素垂直居中对齐
Daily practice ----- realize the lottery function of two-color ball. Rules: Six non repeating numbers are randomly selected from 36 red balls, and one from 15 basketball is randomly selected to form a
动态规划——474. 一和零
4-day excel practical training camp, 0.01 yuan special offer for only three days, 200 sets of learning kits
LabVIEW加载和使用树型控件项目中的定制符号
Xctf attack and defense world web master advanced area php2
【LeetCode】34、在排序数组中查找元素的第一个和最后一个位置
C language to achieve a dynamic version of the address book
20220726 at command test of Bluetooth module hc-05 of Huicheng Technology
What is tor? What is the use of tor browser update?
How to use JDBC to operate database
MangoPapa 的实用小脚本(目录篇)
Shell: one click deployment PXE
MySQL stored procedures use cursors to synchronize data between two tables
Redis source code analysis (who says C language can't analyze it?)
Unity背包系统
After 95, Alibaba P7 published the payroll: it's really heartbreaking
Collection | 0 basic open source data visualization platform flyfish large screen development guide