你能在笔记本中 `source` `ipython profile` (Jupyter) 吗?
Can you `source` the `ipython profile` (Jupyter) while in a notebook?
iPython 配置文件或 Jupyter 配置文件路径:~/.ipython/profile_default/startup/startup.ipy
我经常更新这个。
有没有办法在笔记本中source
实现这一点,就像您在终端机中时和在您进行更新后source ~/.bash_profile
?我目前的方法是关闭内核和 Jupyter 会话然后重新启动。
您可以使用 %run 来执行此操作:
%run ~/.ipython/profile_default/startup/startup.ipy
如果您这样做 %run -i [script]
,那么您当前的交互式命名空间将可用于脚本。
iPython 配置文件或 Jupyter 配置文件路径:~/.ipython/profile_default/startup/startup.ipy
我经常更新这个。
有没有办法在笔记本中source
实现这一点,就像您在终端机中时和在您进行更新后source ~/.bash_profile
?我目前的方法是关闭内核和 Jupyter 会话然后重新启动。
您可以使用 %run 来执行此操作:
%run ~/.ipython/profile_default/startup/startup.ipy
如果您这样做 %run -i [script]
,那么您当前的交互式命名空间将可用于脚本。