缺少Ipython Cell Magics

时间:2013-12-30 07:41:12

标签: ipython-notebook ipython-magic

在运行%lsmagic的ipython笔记本中,我得到:

Available cell magics:
%%!  %%bash  %%capture  %%file  %%perl  %%prun  %%python3  %%ruby  %%script  %%sh  %%sx   %%system  %%timeit

我期待看到:

可用的细胞魔法: %%! %% HTML %% SVG %% bash %% capture %% debug %% file %% html %% javascript %% latex %% perl %% prun %% pypy %% python %% python3 %% ruby​​ %% script %% sh %% svg %% sx %% system %% time %% timeit %% writefile

(来自http://nbviewer.ipython.org/github/ipython/ipython/blob/master/examples/notebooks/Cell%20Magics.ipynb

我的python版本是2.7.4,我的Ipython版本是0.13.2。我也是在Ubuntu上这样做的。如何更新我的ipython魔法?

1 个答案:

答案 0 :(得分:1)

元提问:回答自己问题的礼仪是什么?特别是如果答案变得相当简单。

这个问题的解决方案相当容易。我的ipython版本已经过时了; apt-get有一个过时的ipython版本。为了解决这个问题,我使用pip(我刚刚学到的是更新和安装python包的规范方法)将ipython升级到当前的稳定版本。