Issue
Code of .ipynb file:
Python is detected:
The code has color in jupyter notebook:
I tried setting up a jupyter notebook in vs code in an anaconda environment. I have tried - Python: Select interpreter and selected my anaconda environment. Made sure python is in the environment: python --version: Python 3.8.8. Tried clicking on CVE(in the bottom right corner) to change to python (picture 2). The colorization of the code works fine in the interactive window of jupyter notebook (picture 3).
Solution
Jupyter extension detects your code as CVE instead of Python so Python syntax highlighting is not applied successfully.
Refer to Jupyter in vscode can't execute syntax highlighting, the Dependency Analytics extension should be the reason. Remove or Disable it then reload window, the question should go away.
Answered By - Molly Wang-MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.