Install ipython with autoload

1. Install ipython:

pip install ipython

2. Create a default profile:

ipython profile create

3. Edit profile at: ~/.ipython/profile_default/ and add (or uncomment) the following lines:

c.InteractiveShellApp.exec_lines = []
c.InteractiveShellApp.exec_lines.append('%load_ext autoreload')
c.InteractiveShellApp.exec_lines.append('%autoreload 2')

Alternatively you can run the following commands each time you run the ipython shell:

%load_ext autoreload
%autoreload 2

Leave a Reply