设置Jupyter QtConsole的默认配置 [英] Setting default configuration for Jupyter QtConsole

查看:157
本文介绍了设置Jupyter QtConsole的默认配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ubuntu 16.04中安装了Jupyter QtConsole.如何设置默认配置,例如字体系列,大小和初始导入?

I have Jupyter QtConsole installed in Ubuntu 16.04. How can I set default configuration like font family, size and initial imports?

推荐答案

有关配置选项的文档jupyter 在这里将非常有帮助.

The docs on configuration options for jupyter will be very helpful here.

简而言之,请在您喜欢的文本编辑器中打开~/.jupyter/jupyter_qtconsole_config.py,然后找到您感兴趣的选项.

In short, open ~/.jupyter/jupyter_qtconsole_config.py in your favorite text editor and find your options of interest.

  • 字体家族:c.ConsoleWidget.font_family
  • 字体大小:c.ConsoleWidget.font_size
  • Font family : c.ConsoleWidget.font_family
  • Font size : c.ConsoleWidget.font_size

启动脚本和初始导入会稍微复杂一些,因为它们是ipython内核的属性,需要在您的ipython配置中进行设置.在~/.ipython/profile_default/ipython_kernel_config.py

Startup scripts and initial imports will be a little more complicated since those are properties of the ipython kernel, which will need to be set in your ipython config. In ~/.ipython/profile_default/ipython_kernel_config.py,

  • 初始进口:c.InteractiveShellApp.exec_lines = ['import numpy as np','import pandas as pd']

这篇关于设置Jupyter QtConsole的默认配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆