Jupyterlab doesn't display some cells visible in jupyter notebook - jupyter

Jupyterlab search function is not working properly. It finds patterns but doest jump to them as in the gif bellow. The pattern is obviously in the notebook, confirmed with grep.
This happen with all notebooks. Sometime when the pattern is displayed on the same page. It does finds it and jumps to it. The behavior is the same in code or markdown cell and also in the notebook checkpoint file.
When the notebook is opened in the classic notebook, the cells are visible.
I have deleted all other cells and save only one of the problematic cells. That cell is now visible in jupyterlab!

I had the same issue. For me it seemed to be that the jupyterlab toc extension wanted nodejs 12+ which isn't available from the standard conda channels at the moment.
This fixed it for me:
conda install -c conda-forge nodejs

Related

Why do my internal hyperlinks not work in my notebook when creating them remotely?

I have quite a large jupyter notebook I'm working on in VScode, while using the high performance computing facility (connected through SSH).
I am trying to create some internal hyperlinks so I can jump from my table of contents to a specific section in the notebook. However, this does not work.
Code I'm using to create the link:
[Summary](#Summary)
some other cells
## Summary
It does create a link, but clicking on it does not work in VScode. This one keeps me right at the top of the notebook, other links to sections further down bring me to seemingly random cells down my file. Also, when opening the notebook in Github, clicking the link brings me back to the folder where my notebook is located.
The same construction does work both in a local jupyter instance, and in vscode, when not connected to the HPC.
One difference I can think of is that I use miniconda on the HPC, and the full anaconda installation locally.
Are the links not supported in miniconda? Or is it something else?

VS Code - Why is my Jupyter Notebook UI a bit different from official docs?

I'm using the latest VS Code version 1.56 (April 2021) and I installed the official Jupyter extension of version v2021.6.811652604, which is also the latest version.
In the version 1.56 update notes, there's a screenshot showing the UI of a Jupyter Notebook:
As you can see, the cell input UI contains a toolbar at the top right corner and there's also two buttons ("+ Code" and "+ Markdown") at the cell's bottom.
However, it seems like my VS Code Jupyter extension is still using the old UI. When I create a new notebook by running the Command Palette command Jupyter: Create New Blank Notebook, here's what the UI looks like in my VS Code:
Even when I'm hovering over the cell, I cannot see the toolbar at the top right corner similar to that in the update notes. Also, I see no "+ Code" and "+ Markdown" buttons.
Can anyone explain why this is the case? Do I need to use VS Code Insiders in order to get the UI in the first screenshot? Thanks a lot!
Update 1
I have updated my Jupyter Notebook using pip install notebook --upgrade and still VS Code is having the old UI as shown in the second screenshot
Thanks to Alex's comment, the reason is that the first screenshot is taken under VS Code Insiders Edition, in which it is using the Notebook API to add more UI components and functionalities to the Jupyter Notebook.
According to the Notebook API documentation:
Note: The Notebook API is still proposed and under development, which
means it is only available on VS Code Insiders and requires adding
vscode.proposed.d.ts to your extension project.
Since I'm using the stable release of VS Code, Notebook API is not available yet and hence it's still using the old UI.

Jupyter Python logo

Does anyone know how to add Python logo to the top right corner of python notebooks in Jupyter ?
I see Ruby notebooks are added w/ Ruby logo automatically.
Can this be done in Python notebooks ?
Zarak, This is what I see
$ jupyter kernelspec list
Available kernels:
python2 d:\Continuum\Anaconda2\lib\site-packages\ipykernel\resources
ruby d:\eclipse\.ipython\kernels\ruby
$ pwd
/d/Continuum/Anaconda2/lib/site-packages/ipykernel/resources
$ ls
logo-32x32.png logo-64x64.png
This is NOT a solution, but an amelioration of the problem...
I had (still do) similar issue on my OS X 10.7. In my case, jupyter's python kernel, while not able to find logo-64x64.png file, would auto-redirect me to 404 page as soon as Notebook loads - so I was not able to use Notebooks at all.
If anyone else is having similar issue, I suggest to try any of the following steps (until you can use Notebook again). I still see 404 GET /kernelspecs/Python%20[Root]/logo-64x64.png message in Terminal - however, now I do not get redirected to 404 page automatically upon loading the Notebook.
initially I was using Firefox as default browser, however I switched to Chrome.
initially I only had kernel for python2.7 installed. Now I added kernel for python3.
I generally call jupyter with --notebook-dir argument. I copied into the folder I specify in that argument - the files from location, which I get by running jupyter kernelspec list (2 logo files and 1 json file)
In the end, I still have the same issue - and I am anxiously waiting for somebody else to respond with a solution. However, hope this helps some people in the meantime.

Canopy / iPython Notebook Image Issue

I've installed Enthought Canopy 1.3.0.1715 on Max OSX 10.9.2, and updated all packages. All seems to have gone well until trying to create a new iPython notebook. When the notebook opens, none of the buttons for the notebook contain any images (just small 'x''s). II believe this problem is causing other issues in notebooks, but I'd like to get this one fixed first. Has anyone seen this and have a solution / idea? FYI, This works fine starting notebook from the terminal, just not as how Canopy is hosting the notebook.

How to autosave ipython notebook

Does anyone know if there's an option (or a suggested hack) to make IPython notebooks save automatically before executing a cell?
Many times I've been working on something without saving for quite some time, then I execute a stupid command that prints so much crap to the console that my browser becomes unresponsive, leading to me losing all my work.
A timed autosave might also do the trick.
The development version has that feature fully implemented. Install it by following the instructions on the ipython github.
Instructions form the repo:
If you want to hack on certain parts, e.g. the IPython notebook, in a
clean environment (such as a virtualenv) you can use pip to grab the
necessary dependencies quickly:
$ git clone --recursive https://github.com/ipython/ipython.git
$ cd ipython
$ pip install -e ".[notebook]"
This installs the necessary
packages and symlinks IPython into your current environment so that
you can work on your local repo copy and run it from anywhere:
$ ipython notebook
Updating iPython Notebook solved several problems I had with iPython Notebook; for instance, it autosaves, or auto-correction is disabled, or %matplotlib inline works now (before updating, I had to use --pylab inline in the command line when I was running $ipython notebook).
As I use coda on my mac, I updated iPython Notebook via conda:
$conda update ipython
You could simply set a lower interval for autosave feature using the following magic command:
%autosave 60
in order to save automatically your notebook every 60 seconds.