Reputation: 1844
In Jupyter notebook, cntrl
+ m
L
toggles code line numbers in current cell but how to bring the code line numbers in JupyterLab?
Referred a similar issue opened in github
Upvotes: 46
Views: 59417
Reputation: 1
Fix for JupyterLab 4.3.4. Edit the file:
$HOME/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings
and change
"codeCellConfig": {
"lineNumbers": false,
},
to true
. Then restart JupyterLab.
Upvotes: 0
Reputation: 71
I'm new at this so don't flame me. But Frank said from View -> Show Line Numbers. I did this from main JupyterLab window. I'm using version 3.5.0.
Upvotes: 1
Reputation: 883
In your Jupyter Lab, click the chain, View -> Line numbers. This solution is from this GitHub issue.
Upvotes: 2
Reputation: 946
you can turn this on by default by going into Settings --> Advanced Settings Editor:
As you can see from the screenshot, you can edit other features as well and easily set them back to default by deleting your 'User Overrides'
Go to Settings > Advanced configuration and add:
{
"codeCellConfig": {
"lineNumbers": true
}
}
Upvotes: 59
Reputation: 76
Late reply, but it'll still help others!
For Windows users, just hit Shift + L
Upvotes: 3
Reputation: 998
https://github.com/jupyterlab/jupyterlab/issues/2395 - Shift+L toggles line number visibility.
Upvotes: 62
Reputation: 83197
You can go to View -> Show Line Numbers
:
which will display line numbers in the notebook:
Upvotes: 40