Skip to content

Troubleshooting Jupyter

Don Jayamanne edited this page Nov 2, 2016 · 1 revision

Troubleshooting Jupyter

1. Changes not reflected in execution of cells. ...

When executing a cell block, modified code defined in an imported python file (module) does not get picked up.
Assume you have a function being invoked in a cell and this function is defined in a separate python file. Making changes to this python file will have no effect when executing the cell.

Cause: ipython will not automatically reload modules on change unless told to do so via configuration
Solution: Create a configuration file named ipython_config.py with the following contents:

c = get_config()
c.InteractiveShellApp.extensions = ['autoreload']
c.InteractiveShellApp.exec_lines = ['%autoreload 2']
c.InteractiveShellApp.exec_lines.append('print("Warning: disable autoreload in ipython_config.py to improve performance.")')
Clone this wiki locally