安装IPython笔记本目录

2024-06-02 06:49:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我想安装扩展来使用标题单元格生成自动目录。在

但是,当我复制/粘贴

curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.js > $(ipython locate)/nbextensions/toc.js

进入终端,它显示目录未找到。有问题的扩展名可以找到here。在


Tags: httpsmaster目录com标题粘贴ipythonjs
3条回答

我做了以下工作,它对我使用Ubuntu很有用:

1. git clone https://github.com/minrk/ipython_extensions.git

2. ln -s $(pwd)/extensions $(ipython locate)/extensions
   ln -s $(pwd)/nbextensions $(ipython locate)/nbextensions

3. curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/gist.js > $(ipython locate)/nbextensions/gist.js

4. I use ubuntu so I  used the text editor from bash like so   gedit $(ipython locate profile)/static/custom/custom.js. 

5. I appended "IPython.load_extensions('gist');" to the bottom of  custom.js and saved the file.

如果要安装Retina Figures扩展,请按照下面的说明here

如果您使用的是Windows,那么有一个教程here,它展示了如何在Windows和Linux中创建sym链接。在

如果您没有安装git,那么下载带有link的zip文件

This IPython Notebook半自动地为minrk在Windows中的目录生成文件(我想只需要更改一个文件

%%cmd- to %%bash magics 

使它在Linux下工作)。它不使用“curl”命令或链接,而是将*.js和*.css文件直接写入IPython笔记本配置文件目录。在

笔记本上有一节叫做“你需要做什么”—跟着它,有一个很好的浮动目录:)

下面是一个已经显示的html版本: http://htmlpreview.github.io/?https://github.com/ahambi/140824-TOC/blob/master/A%20floating%20table%20of%20contents.htm

克隆回购和创建sum链接对我来说并不管用。在

在使用ipython 1.1时,我必须执行以下操作:

  1. 下载jquery-2.0.2。最小地图,从this link复制到$HOME/.ipython/profile\u default/static/components/jquery/
  2. 在$HOME/.ipython/profile\u default/static/
    ln-s../../n扩展名nbextensions

扩展名要求节标题位于单独的单元格中。因此,如果有一个带有几个标题和副标题的降价单元格,它将不会被识别。在

对于ipython2.2,还需要下载主干和下划线的最小映射文件。在

相关问题 更多 >