Since the Jupyter notebook I used earlier is based on the python2.7 version, just install the python3.6 based kernel on this basis.
My environment is as follows:
Windows 10, 64-bit systems
Installed based on python2.7 version of Anaconda
Installed the PY27 and PY36 virtual environment in Anaconda
The kernel of existing Jupyter notebook is based on python2.7 version py27 kernel based on py36
In Jupyter notebook, select a different Python version, called the Kernel (kernel). When installing, install Ipykernel.
In the previous article, I installed the Anaconda virtual environment py36 on the specified path (D:\ANACONDA2\ENVS\PY3), so when installing Ipykernel, you also need to specify the installation. The installation command is "Conda install--prefix=d:\anaconda2\envs\py3 Ipykernel", as follows:
Then activate the PY36 virtual environment and enter the command:
Avcivate D:\Anaconda2\envs\py3
Python-m Ipykernel Install--user
Start Jupyter notebook To see, then you can see that the Python3 kernel has been installed.
Similarly, the kernel method of Python2 on the base of the Python3 kernel is also applicable.