notebook安装与配置
安装
pip install notebook
直接安装可能会失败,使用清华镜像安装
pip install -i https://pypi.tuna./simple notebook-i表示临时使用
cmd启动
jupyter notebook
修改工作目录
cmd:
jupyter notebook --generate-config
根据cmd中显示的路径:C:\Users\xxx.jupyter\jupyter_notebook_config.py
找到jupyter_notebook_config.py文件
打开文件修改配置搜索notebook_dir取消注释把需要的目录复制粘贴到引号中,如果路径是反斜杠分割,引号前面加rc.NotebookApp.notebook_dir = r’(想要保存文件的目录路径)’设置启动程序 在上一步设置的目录里面添加start.cmd里面添加jupyter notebook以后双击这个文件就可以打开jupyter notebook
notebook使用
新建文件与导入文件单元格分类:code、markdown命令模式(蓝色边框)与编辑模式(绿色边框)常用快捷键 单元格类型转换:Y、M插入单元格:A、B进入命令模式:Esc运行单元格:ctrl/shift/alt + enter删除单元格:DD 启动代码提示功能:Tab键ipython profile create
C:\Users\xxx\.ipython\profile_default\ipython_config.py
pleter.greedy = True
pleter.jedi_compute_type_timeout = 400
pleter.use_jedi = True