jupyter设置多行输出
通过修改配置文件python-config.py ipython-kernel-config.py
通过命令ipython profile create 显示文件位置信息
修改文件ipython_config.py
将c.InteractiveShell.ast_node_interactivity的值由‘last_expr’改为’all’,并去取消注释
jupyter extensions
安装
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
jupyter --data-dir返回本地jupyter地址,一般在C:\Users\admin\AppData\Roaming\jupyter
jupyter common extensions
extension | function |
---|---|
Autopep8 | 代码美化 |
Codefolding | cell可折叠 |
Collapsible Headings | markdown标题折叠 |
Highlight selected word | 选中词全文高亮 |
highlighter | 支持markdown的文字背景颜色,其实就是自动写html代码 |
Hinterland | 代码补全 |
Initialization cells | 设置初始化cells,一键运行 |
Scratchpad | 草稿cell,可以用来临时调试代码,用完就销毁 |
Snippets | 自定义导入包,一键导入 |
Table of Contents(2) | 生成markdown的标题的navigate |
jupyter启动
指定端口
jupyter notebook --port <port_number>
更改主目录位置
jupyter notebook --generate-config
查找c.NotebookApp.notebook_dir,取消注释,换成其他目录
去掉文件属性里的"%USERPROFILE%/"