I tried using this code to turn off the lines:
IPython.Cell.options_default.cm_config.lineNumbers = false;
And I also tried
IPython.Cell.options_default.cm_config.lineNumbers = False;
But I get the following error: name 'IPython' is not defined
If I understand your question correctly, the solution is to click on the 'Toggle Line Numbers' inside the View Tab of your Jupyter Notebook.