安装
windows下
pip install --upgrade pip 更新pip
pip install jupyter 安装jupyter
ubuntu18.04下
sudo pip3 install jupyter 安装jupyter
启动jupyter-notebook
使用pip install jupyter报错处理办法及修改Jupyter默认加载路径的方法
- 发现是安装过程中安装到pyzmq一直报错
- 手动更新pip之后依然报这样的错
- 手动更新pyzmq
- pip install pyzmq==17.1.0
- 手动更新pyzmq之后,再次执行pip install jupyter安装成功
- 安装完成后启动jupyter,启动完成后发现进去默认文件路径不是自己想要的路径
- 执行jupyter notebook --generate--config,查看配置文件路径
- 打开配置文件修改配置文件的c.NotebookApp.notebook_dir的路径为自己想要的路径即可
运行
windows下命令行输入命令:jupyter notebook
ubuntu18.04下启动命令:jupyter-notebook
使用
基本使用
Anaconda是一个集成环境(基于机器学习和数据分析的开发环境)
基于浏览器的一种可视化开发工具:jupyter notebook
可以在指定目录的终端中录入jupyter notebook指令,然后启动服务。
cell是分为不同模式的:
Code:编写python代码
markDown:编写笔记
快捷键:
添加cell:a,b
删除cell:x
执行:shift+enter
tab:
切换cell的模式:
m
y
打开帮助文档:shift+tab
全部行都能输出显示
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
浙公网安备 33010602011771号