Save an IPython notebook programmatically from within itself?

I am taking @Taar’s comment and making it an actual answer since it worked for the original person who asked the question and for myself. from IPython.display import display, Javascript display(Javascript(‘IPython.notebook.save_checkpoint();’)) This will create checkpoints – same thing as CTRL-s. Note: in Jupyter, CTRL-s triggers an async process and the file save is actually completed … Read more

read-only cells in ipython/jupyter notebook

@Richard Ackon’s answer requires adjustments for JupyterLab: Open the Property Inspector. Focus the cell you want to lock. Add the following lines to the Cell Metadata: { “trusted”: true, “editable”: false, “deletable”: false } Click on the tick to save the metadata… Tadah!, your cell can’t be modified or deleted. The Property Inspector comes built-in … Read more

LaTeX error related to tcolorbox.sty not found

After installing tcolorbox using LaTex’s package manager tlmgr, I was getting similar errors for other dependencies. The solution below worked for me on Ubuntu 18.04 (64 bit) at the terminal: tlmgr update –all –self tlmgr install tcolorbox tlmgr install pgf tlmgr install xcolor tlmgr install environ tlmgr install trimspaces tlmgr install mathpazo tlmgr install parskip … Read more

Visual Studio Code does not detect Virtual Environments

In VSCode open your command palette — Ctrl+Shift+P by default Look for Python: Select Interpreter In Select Interpreter choose Enter interpreter path… and then Find… Navigate to your venv folder — eg, ~/pyenvs/myenv/ or \Users\Foo\Bar\PyEnvs\MyEnv\ In the virtual environment folder choose <your-venv-name>/bin/python or <your-venv-name>/bin/python3 The issue is that VSCode’s Python extension by default uses the … Read more

ImportError: IProgress not found. Please update jupyter and ipywidgets although it is installed

I tried everything you mentioned in a new environment using conda and I had another issue related to the version of ipywidgets (a bug found in Github with comments saying that got solved after using last version). I solved the problem I had installing last version of ipywidgets. Here is my process: Create a new … Read more