jupyter巨好玩-简介与安装

本文详细介绍了Jupyter的起源与IPython的关系,Jupyter不仅继承了IPython的功能,如交互式Python解释器,还扩展了对R、Spark等的支持。文章提供了Jupyter的安装指南,包括通过Anaconda和pip的方式,并介绍了其用户界面和主要功能,如代码编写、文档编辑和科学计算。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ipython notebook改名jupyter了而且更好玩更好用

jupyter简介

jupyter是啥啊?
这个要从ipython说起,ipython是个交互式的python的解释器,自带颜色,补全还有行号,科学界的很多大牛都用来进行数据分析和图形显示。

ipython还可以运行在浏览器上,就是下面这个样子:

tryjupyter_file.png

名字也就高大上一点,叫ipythoon notebook,那个jupyter图标一开始就有的,现在升级改造了,不止于运行python,还有R,spark之类的高大上玩意儿。所以就直接用 jupyter来指代这一对产品了。

官方有个try页面,可以玩一玩。

https://try.jupyter.org/

jupyter安装

官方推荐的安装是这个:http://jupyter.readthedocs.io/en/latest/install.html

Download Anaconda. We recommend downloading Anaconda’s latest Python 3 version (currently Python 3.5).
Download Anaconda. We recommend downloading Anaconda’s latest Python 3 version (currently Python 3.5).
Install the version of Anaconda, which you downloaded.
Install Jupyter using conda from the Terminal (Mac and Linux) or a Command Prompt window (Windows):
conda install jupyter
Congratulations. You have installed Jupyter Notebook. To run the notebook:
jupyter notebook

咱们民间可以直接安装
如果已经有python环境:

直接pip install jupyter

如果没有:
就先安装个python环境,然后再装

运行

jupyter notebook

然后就自动打开浏览器中localhost的8888端口,就可以在线写代码啦!不止于python,还有R等...

用户界面和主要功能

152871-20160513103201515-583199632.png

  • 写代码
  • 写文档(cell类型就分成markdown和code,随便改,所以我这文章都是直接写出来的)
  • 科学运算和画图(numpy, scipy,pandas之类的以前都需要一个个安装啊,现在全齐了)

示例代码

4+6
10

这货是个装饰器

def show_output(func):
    def wrapped(*args, **kwargs):
        output = func(*args, **kwargs)
        print("the result is : ", output)
    return wrapped
def is_even(num):
    return num % 2 ==0

使用装饰器运行函数,并输出结果

f = show_output(is_even)
f(3)
the result is :  False

参考资源

转载于:https://www.cnblogs.com/de8ug/p/jupyter-install.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值