Jupyter notebook kernel issue in vscode : Kernel not selectable in a specific folder

Question:

I’m a beginner in python, using jupyter notebook in VSCode.

In a specific folder, which I use as a workspace, there is no kernel available, shown as below. (‘Select kernel’ shows up at the top right corner)
enter image description here

The funny part is that if I open a folder (Ctrl K + O), including directories above or below that folder, kernel shows up in the top right corner like the image below.
enter image description here

I tried to reinstall VSCode, python and jupyter, but nothing solved this issue.

Please help.

Asked By: kingnum

||

Answers:

1.Check your Python Interpreter by using shortcuts "Ctrl+Shift+P" then type "Python: Select Interpreter" to choose your python interpreter.

2.Click the button to choose your jupyter kernel.

3.If this doesn’t work, open your settings.json and add the following codes to it:

"python.defaultInterpreterPath":"Path/to/your/Python"

For example:
"python.defaultInterpreterPath":"C:/Users/Administrator/AppData/Local/Programs/Python/Python311/python.exe"

Answered By: MingJie-MSFT