Using both Python 2.x and Python 3.x in IPython Notebook

后端 未结 11 2173
生来不讨喜
生来不讨喜 2020-11-22 02:27

I use IPython notebooks and would like to be able to select to create a 2.x or 3.x python notebook in IPython.

I initially had Anaconda. With Anaconda a global envi

11条回答
  •  误落风尘
    2020-11-22 03:19

    Under Windows 7 I had anaconda and anaconda3 installed. I went into \Users\me\anaconda\Scripts and executed

    sudo .\ipython kernelspec install-self
    

    then I went into \Users\me\anaconda3\Scripts and executed

    sudo .\ipython kernel install
    

    (I got jupyter kernelspec install-self is DEPRECATED as of 4.0. You probably want 'ipython kernel install' to install the IPython kernelspec.)

    After starting jupyter notebook (in anaconda3) I got a neat dropdown menu in the upper right corner under "New" letting me choose between Python 2 odr Python 3 kernels.

提交回复
热议问题