在python中安装ipython后会发现只有一个版本的kernel,这个时候如果能自由的切换python2 python3将极大的便利我们的码代码过程,具体方法如下:
要添加python3的kernel,在Windows下cmd中设置:
C:\ipython3 kernelspec install-self
添加python2的kernel,可以将ipython3改为ipython2,如下:
C:\ipython2 kernelspec install-self


打开ipython后就可以看到两个版本的python可供选择~