安装 Jupyter
pip3 install jupyter
配置
# 生成配置文件
jupyter notebook --generate-config
# 编辑配置文件
nano ~/.jupyter/jupyter_notebook_config.py
修改配置项
# 开启所有的IP访问,即可使用远程访问
c.NotebookApp.ip = '*'
# 指定工作目录
c.NotebookApp.notebook_dir = '自己指定的文件夹路径'
# 启动后不自动打开浏览器
c.NotebookApp.open_browser = False
主题样式
# 安装主题样式
pip3 install jupyterthemes
# 列出主题样式
jt -l
# 选定主题样式
jt -t 主题名字
# 恢复默认
jt -r
安装代码补全提示
pip3 install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
pip3 install jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
运行异常修复
运行过程中若出现错误
[W 21:38:32.999 NotebookApp] Config option
template_path
not recognized byExporterCollapsibleHeadings
. Did you mean one of:extra_template_paths, template_name, template_paths
?降低
nbconvert
版本pip3 install nbconvert==5.6.1
运行过程中若出现错误
TypeError: init() got an unexpected keyword argument 'column'
降低
jedi
版本pip3 install jedi==0.17
网友评论