anaconda2 打开jupyter Notebook及简单使用

来源:互联网 发布:软件的特性 编辑:程序博客网 时间:2024/06/07 03:03

Anaconda集成了NumPy,Pandas, matplotlib, scikit-learn,jupyter notebook等很多的工具包。在安装上简便很多。 
一,修改起始路径配置: 
安装了anaconda后,查看电脑的开始下的所有程序,anaconda下已经安装了jupyter notebook: 
这里写图片描述 
打开jupyter notebook: 
这里写图片描述 
没有跳转到jupyter notebook 的Home 网页。

查看jupyter notebook的起始路径: 
这里写图片描述 
如上图,右键jupyter notebook,弹出下拉框,选择属性 
这里写图片描述

更改起始位置配置: 
方法1: 
比如我想把以后写的jupyter notebook文档保存在E:\pythonNotebook下,那么就将起始位置修改为:E:\pythonNotebook,点击确定。 
方法2: 
找anaconda2的安装路径,我的放在了D:\program files\Anaconda,找到文件夹‘etc’—>jupyter, 打开jupyter_notebook_config.json文件。添加路径:”notebook_dir”:”E:\pythonNotebook”, 
这里写图片描述

修改了起始路径后,重新打开jupyter notebook,黑色窗口显示结束后,跳转到jupyter notebook的Home网页,就可以在这里写文档了。 
这里写图片描述

二,简单使用: 
这里写图片描述
启动jupyter界面,点击new下选择python,调整界面: 
这里写图片描述

在In[]: 下,输入代码后,点击工具栏中的运行箭头,运行得出结果,显示在out[]中。也可以点击菜单栏上的Cell下的ruan cell运行。

工具栏的+号,添加编辑单元格,此时都是code方式,若想要添加注释说明,那么选择markdown。 
这里写图片描述

若要同时运行多个code单元格,那么选择菜单栏cell下的Run All 
这里写图片描述

其他功能参考 
http://www.codingpy.com/article/getting-started-with-jupyter-notebook-part-1/?utm_source=tuicool&utm_medium=referral

原创粉丝点击