Change jupyter notebook topic

Jupyter notebook using the default theme for a long time prone to visual fatigue, and greater harm to the eyes white background, it is still necessary to modify the theme

Change jupyter notebook topic

Tools / materials

  • Installation jupyter notebook, if not, please download, Download References

  • Theme pack jupyter themes, see reference Download

Method / Step

  1. After the download good theme package, enter pip install --upgrade jupyterthemes at the command prompt, install the theme package

  2. After installing, enter jt -l at the command prompt, you can view the theme:

    Available Themes: 

    chesterish 

    grade3 

    monokai 

    oceans16 

    onedork 

    solarizedd 

    solarizedl

    It would continue to execute the command: jt -t theme name (theme name can be selected chesterish ....)

    So that you can modify the theme, which is open jupyter notebook you can see the theme of the revised

    Change jupyter notebook topic

  3. After entering jt -l course also possible error, the last line in the command prompt is displayed:

    UnicodeDecodeError: 'gbk' codec can't decode byte 0x8b in position 41271: illegal multibyte sequence。。。

    This procedure may be modified by the methods described below to correct:

  4. The first step, modify stylefx.py

    File Location: D: \ Anaconda3 \ Lib \ site-packages \ jupyterthemes (a different computer, the path is not the same, particularly to see the position of the mounting anaconda)

    Open stylefx.py, modify the code used jupyter notebook

    Change jupyter notebook topic

    Change jupyter notebook topic

  5. The second step, modify lexer.py file

    File address: D: \ Anaconda3 \ Lib \ site-packages \ lesscpy \ lessc (a different computer, the path is not the same, particularly to see the position of the mounting anaconda)

    Use jupyter notebook open file lexer.py 

    Change jupyter notebook topic

    Change jupyter notebook topic

  6. Finally, you can enter at the command prompt: JT -t theme name   to modify the theme of the jupyter notebook, for example, enter jt -t chesterish, after jupyter notebook open, you can see the appropriate topic, see below

    Change jupyter notebook topic

Guess you like

Origin blog.csdn.net/huobanjishijian/article/details/91382778