问题
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?
回答1:
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.0or
conda install notebook==5.5.0Customize local CSS
Add the following code (сheck out this thread for more flexible and sophisticated solutions) to your
custom.cssfile..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.cssFor Conda on Windows try
C:\Users\UserName\Anaconda3\Lib\site-packages\notebook\static\custom\custom.cssCheck 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>
来源:https://stackoverflow.com/questions/54607200/remove-play-button-display-at-every-cell-line-of-jupyter-notebook