lint lint - 12 days ago 5
Python Question

IPython cell magics?

My IPython Notebook (IPython 3.1.0, Python3.4, windows7) shows all the magics I would expect when I do

%lsmagic
, however when I try to run the
%%python2
magic, I get an error:
Couldn't find program: 'python2'
, do I have to set an environment variable for the cell magic?

Answer

You need to have Python 2 installed on your machine. When you type:

python2

on the command line Python 2 has to a start.

Comments