How to install python2.7 kernel on IPython3.0?

434 views
Skip to first unread message

Xuefeng LIU

unread,
Aug 22, 2015, 11:07:30 AM8/22/15
to Project Jupyter
Hi, everyone,

I run IPython notebook by the following command:

sudo ipython3 notebook --profile-dir=/etc/ces/ipython/profile_myserver/ --user=xfliu95 --ipython-dir=/tmp/xfliu95/ipython --notebook-dir=/home/xfliu95

The kernels installed are listed as below.

$ ipython3 kernelspec list
Available kernels:
  python3
  octave_kernel


In the dropmenu of ipython notebook, I can select both python3 and octave.

Since I have some python code that only runs on python2.7, I would like to add python2.7 kernel for ipython 3. 
Could anyone give me some hint on the kernel installation? 
I would like to see python 2.7 in the dropmenu of IPython notebook.


Xuefeng LIU




Thomas Kluyver

unread,
Aug 22, 2015, 1:38:56 PM8/22/15
to Project Jupyter
On 22 August 2015 at 08:07, Xuefeng LIU <xfliu...@gmail.com> wrote:
Since I have some python code that only runs on python2.7, I would like to add python2.7 kernel for ipython 3. 
Could anyone give me some hint on the kernel installation? 

You'll need to install IPython for Python 2.7 (using pip or conda running on 2.7), and then run 'ipython2 kernelspec install-self'.

Xuefeng LIU

unread,
Aug 26, 2015, 9:34:57 AM8/26/15
to Project Jupyter
Dear Takowl,

Many thanks for your advice. After several days of struggling work, everything works well now.

I installed python2.7 and python3.4 by using conda. Yes, conda is very cool. 

Thanks again!



2015年8月23日日曜日 2時38分56秒 UTC+9 takowl:
Reply all
Reply to author
Forward
0 new messages