How to use both Python2 and 3 in Jupyter.
Since I am installing Jupyter notebook through anaconda, the coexistence of Anaconda2 (Python2) and Anaconda3 (Python3) needs to be addressed first.
You only need to select the Anaconda3 installation directory in the D:\Anaconda2\envs subdirectory. Detailed installation tutorials See this blog post: http://blog.csdn.net/infin1te/article/details/50445217
After the installation is complete, the direct input python inside cmd will start Python2, and then use python to switch to Python3 after using activate Py3 (Py3 the name of the directory folder before Python3 install).
The Python2 and Python3 two cores already exist in the Jupyter notebook, but are not tested.
There are tutorials on the web that have to activate the Jupyter notebook kernel (ipykernel), which can only be used in 2 versions, and use the official documentation (
Http://ipython.readthedocs.io/en/stable/install/kernel_install.html
Tutorial installs the kernel:
python3-m pip Install Ipykernel
Python3-m Ipykernel Install--user
Currently 2 versions are available.
Reference:
1, http://blog.csdn.net/infin1te/article/details/50445217
2, Https://stackoverflow.com/questions/30492623/using-both-python-2-x-and-python-3-x-in-ipython-notebook
3, http://ipython.readthedocs.io/en/stable/install/kernel_install.html