Unable to set the kernel ("Not specified") for a jupyter notebook in Pycharm
Matthew Barrera
As seen in the screenshot the kernel is "Not specified" and can not set since the dropdown is disabled. Can this be remedied?
The Project interpreter is python3 and otherwise for other file types the project works fine
1 Answer
I've run into the same issue of PyCharm not allowing me to select a Jupyter kernel other than the one that is saved to the notebook (the drop-down menu is either grayed-out as in your picture, or disappears altogether). This condition appears to occur when the kernel that was active when the notebook was saved is not available in the current environment. The only workaround I've found for this situation is:
- Start a Jupyter notebook server using the same Python environment as you are using in PyCharm
- From the Jupyter server web page, open the notebook
- From the Kernel menu, select Change kernel, and then select the desired kernel
- Save the notebook, then close/halt it
- Re-open the notebook in PyCharm. It should then be able to execute with the kernel that was chosen in Step 3 above.