Fixing the up button in Python shell history

In case your python/ipython shell doesn’t have a working history, e.g. pressing ↑ only prints some nonsensical ^[[A, then you are missing either the readline or ncurses library.

Ipython is more descriptive that something is wrong, but if you’re in the habit of mostly using python as a quick calculator, you might never notice:

If you’re using Miniconda then just do:

conda install ncurses readline


And ↑ should work: