Remove play button display at every cell line of Jupyter notebook

SourabhJain

I accidentally pressed some buttons on while I was working on Jupyterbook. Now, each cell shows a 'Run this cell (play button)' icon, which is visually distracting. I cannot find a toggle switch/command to turn it off.

Is there anyway I can turn it off?

ayorgo

You most probably have upgraded the notebook package to the version 5.6.0 or higher.

pip show notebook

or

conda list notebook

will get you the exact version you have.

If the above is the case, unfortunately, your options are limited and are as follows.

  • Downgrade

    pip install notebook==5.5.0
    

    or

    conda install notebook==5.5.0
    
  • Customize local CSS

    Add the following code (сheck out this thread for more flexible and sophisticated solutions) to your custom.css file.

    .code_cell .run_this_cell {
        display: none;
    }
    

    If you're using Conda on Linux you can find the file at (depending on the version of Python you're on)

    ~/anaconda3/lib/python3.7/site-packages/notebook/static/custom/custom.css
    

    For Conda on Windows try

    C:\Users\UserName\Anaconda3\Lib\site-packages\notebook\static\custom\custom.css
    

    Check answers to this question for more details on where the file could be found.

    Alternatively, you can create a new file my-custom.css, put it anywhere you want and then reference it from every notebook individually by using IPython's HTML cell magic

    %%html
    <link rel="stylesheet" href="somewhere-on-your-machine/my-custom.css" />
    

    or explicitly, without needing to create any files

    %%html
    <style>
    .code_cell .run_this_cell {
        display: none;
    }
    </style>
    

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to execute a single line or selected code in a Jupyter Notebook or JupyterLab cell?

How to add syntax highlight to SQL line magic, cell magic and custom command in jupyter notebook?

collapse cell in jupyter notebook

Display sympy functions in Jupyter Notebook

Printing on the same line on a jupyter notebook

How to display line numbers in IPython Notebook code cell by default

remove kernel on jupyter notebook

play sound when Jupyter notebook cell fails

How to enable timing magics for every cell in Jupyter notebook?

How to display widget in Jupyter Notebook?

Remove past Matplotlib plots in the same cell in Jupyter Notebook involving interactive widgets

Jupyter notebook button widget: Remove all click handlers?

How can I display multiple pandas series histograms in the same jupyter notebook cell?

Jupyter notebook display code only

Remove question mark and Enter/Exit Button in RISE (Jupyter Notebook)

Disable Jupyter Notebook cell search

How to run a single line or selected code in a Jupyter Notebook or JupyterLab cell?

Line profiling with cython in jupyter notebook

Image in Markdown cell Jupyter Notebook

Jupyter Notebook markdown cell is not working

How do I display multiple images from one cell in a Jupyter notebook

DataTables - display a button in a cell of every row

Display animation outside of jupyter notebook

Saving the output of a cell in jupyter notebook with a new line after each number

Display multiple images in jupyter notebook

Jupyter notebook cell is not printing anything

Remove buttons line above cell in Jupyter in VSCode

How to display a YouTube Video in Jupyter Notebook by Clicking a Button Using Tkinter

VScode Jupyter Notebook crash in cell