f.ptak
f.ptak

Reputation: 11

No text highlight in jupyter cells

I installed jupyter notebook and don't get any text highlighting on my .ipynb files. It seems that it treats the code as plain text, even though the code is executed perfectly.

No text highlight

On the options, one can see that neither "Python" nor "none" is selected. As a matter of fact, I'm not able to select any option at all!

Non-selectable options

However, this problem doesn't occur when I open with Jupyter Lab.

JupyterLab seems fine

Notes: Not using Anaconda. Installed everything using pip in a virtual environment. Python version 3.12.4 Jupyter Notebook version 7.2.1 JupyterLab version 4.2.3

Refreshing with ctrl + shift + R doesn't work and nothing in the settings seems out of order.

I appreciate any help. Thanks.

Upvotes: 1

Views: 1191

Answers (1)

fletcherjw
fletcherjw

Reputation: 41

I had a similar situation to yours and can verify that clearing the browser cache enabled syntax highlighting in .ipynb files. Interestingly, the "text editor syntax highlighting" options are still greyed out.

My situation (for anybody with a similar issue):

  1. Used Jupyter Notebook through Anaconda (highlighting worked fine).
  2. Uninstalled Anaconda (didn't need it), installed Jupyter Notebook using this tutorial.
  3. Ran Jupyter Notebook from virtual environment and found that highlighting didn't work.
  4. Cleared cache on Firefox and now highlighting works again.

Upvotes: 4

Related Questions