I am experienced Python/Jupyter user, but a Windows newbie, after downloading and installing Anaconda Python 3 distribution and firing up a Jupyter notebook I noticed that the kernel for the Jupyter Notebook says Python[Root]
(instead of Python 3
on Unix-based systems).
Notebook works fine, but sharing notebooks seems to be problematic as whenever a notebook created on my machine is opened on a non-Windows machine the user encounters a "cannot find Python[Root]
kernel" message and is prompted to select Python 3 (or Python 2) kernel. This is annoying.
I do not seem to have the option of changing the kernel manually within the notebook. Perhaps this is an issue with how Anaconda (or Jupyter) is installed on my Windows machine?
To change the kernel version in Jupyter Python Notebooks follow the steps below : Open the Python Notebook and click on " Kernel " from the menu bar located on top of the python notebook. Click on " Change kernel " from the drop down box that appears and chose the version that is required.
1. Change Jupyter Notebook startup folder (Windows) Copy the Jupyter Notebook launcher from the menu to the desktop. Right click on the new launcher and change the Target field, change %USERPROFILE% to the full path of the folder which will contain all the notebooks.
You can also change the name of an open Jupyter Notebook file by clicking on the title textbox at the top of your notebook (e.g. jupyter-notebook-interface ) next to the Jupyter logo. Then, you can simply type in a new name into the title textbox and select Rename .
If nb_conda_kernels package is not used (as in this case), the name of the kernel is taken from the kernel spec file. To find the the kernel spec use jupyter kernelspec list
command:
(base) C:\Users\user>jupyter kernelspec list
Available kernels:
python2 C:\Anaconda2\share\jupyter\kernels\python2
For each kernel there will be kernel.json file in the corresponding folder, where display_name can be changed:
{
"display_name": "Python 2",
"language": "python",
"argv": [
"C:\\Anaconda2\\python.exe",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
]
}
In my case it's a Python 2 environment, but the format is the same for Python 3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With