- Create a file
~/.pythonrc.py - Add
try:
from IPython import get_ipython
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
except AttributeError:
pass- Export the environment variable (add this to
~/.bashrcor~/.zshrc)export PYTHONSTARTUP="/home/jfaria/.pythonrc.py"