@lynne When using ipython I configure it this way: https://github.com/pganssle/dotfiles/blob/a4340fa2a7fadd99b1d1d874cf865d0748bd7f15/dotfiles/ipython_profile_default/ipython_config.py
That's an arbitrary python file that ipython executes at startup time, so you should be able to add your desired imports there.