Install python2, python3, and jupyterpython2 simultaneously in jupyter notebook.
I have discussed how to install multiple python versions in anaconda. In this article, I will discuss how to install python2.7 and python3.x simultaneously in jupyter notebook.
Since the jupyter notebook I used earlier is based on python3.5, you only need to install the kernel based on python2.7 on this basis.
My environment is as follows:
Windows 7, 64-bit
Anaconda Based on python3.5 has been installed
Python 27 and py36 virtual environments have been installed in anaconda
The kernel of the existing jupyter notebook is based on python3.5
Install the kernel of py27 on the basis of the kernel of py35
In jupyter notebook, select different python versions, called kernel (kernel ). Install ipykernel during installation.
In the previous article, I installed anaconda's virtual environment py27 in the specified path (D: \ pyenv \ py27). Therefore, you also need to specify the installation when installing ipykernel. The installation command is "conda install -- prefix = D: \ pyenv \ py27 ipykernel", as follows:
Activate the virtual environment of py27 and enter the following command:
Python-m ipykernel install -- user
Start jupyter notebook to view the information. You can see that the kernel of python2 has been installed.
Tips for Quick Start of jupyter notebook
When you start jupyter notebook, you need to switch the file path every time and enter related commands, which is relatively troublesome. There is a tips for quick start, which I usually use.
Under the folder path you want to open, create a file with the suffix ". bat" (for example, named ipy. bat), open the file in notepad, enter the following content and save it.
rem -- start_ipython_notebook_here.bat ---dirjupyter notebookpause
Double-click the ipy. bat file to start jupyter notebook quickly. I usually send this ipy. bat file to the desktop in a shortcut (pure lazy practices ~~).
Extended reading:
Anaconda installs the virtual environment to the specified path
Python Job Search top 10 cities to see if you have your city
5 minutes to learn how to crawl the Zhaopin website and save it to the MongoDB Database