在Ipython中设置新主题的问题? [英] Problems setting up a new theme in Ipython?
问题描述
我想为Ipython笔记本使用另一个主题,所以我按照这个说明问题是我在OSX,我没有wget,我安装了自制软件。有人可以帮我设置一个黑暗主题的ipython笔记本吗?我试过这个:
I would like to use another theme for Ipython notebook so I following this instructions the problem is I'm in OSX and I dont have the wget, I installed it homebrew. Could somebody help me to set ipython notebooks in a dark theme?. I tried this:
brew /Users/user/.ipython/profile_notebooks/static/custom/custom.css
https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/base16-ocean-dark.css
推荐答案
您可以使用 curl
或手动下载主题。我已经为以下两个选项提供了步骤。
You can do it with curl
or by manually downloading the theme. I have given steps for both the options below.
使用以下命令创建自定义配置文件:
Create a custom profile using the following command:
ipython profile create ocean
替换默认样式表的内容 custom.css
使用以下命令使用所需主题
Replace the content of the default stylesheet custom.css
with that of the required theme using the following command
使用curl:
curl -o `ipython locate profile ocean`/static/custom/custom.css https://raw.githubusercontent.com/nsonnad/base16-ipython-notebook/master/base16-ocean-dark.css
启动 IPython
笔记本通过指定自定义配置文件,例如
Start the IPython
notebook by specifying the custom profile e.g.
ipython notebook --profile=ocean
替代方案:
如果您无法使用 curl
下载,您只需下载 base16- ocean-dark.css
并替换 custom.css
在您创建的个人资料的自定义目录中。
If you are not able to download using curl
, you can simply download the base16-ocean-dark.css
and replace the custom.css
in the custom directory of your created profile.
找到个人资料目录:
ipython locate profile ocean
转到静态/自定义
目录并将 custom.css
的内容替换为已下载 css
文件的内容。
通过指定自定义配置文件启动 IPython
笔记本,如上所示。
Go to its static/custom
directory and replace the content of custom.css
with that of downloaded css
file.
Start the IPython
notebook by specifying the custom profile as shown above.
这篇关于在Ipython中设置新主题的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!