How do I repeat the last command? The usual keys: Up, Ctrl+Up, Alt-p don\'t work. They produce nonsensical characters.
(ve)[kakarukeys@localhost ve]$ python
If you use Debian Jessie run this to fix your system installation 2.7.9
sudo apt-get install libncurses5-dev libncursesw5-dev
To fix my other 3.5.2 installation which I installed with pyenv :
pip install readline
Sources:
[1] https://www.cyberciti.biz/faq/linux-install-ncurses-library-headers-on-debian-ubuntu-centos-fedora/
[2] https://github.com/yyuu/pyenv/issues/240
[3] https://stackoverflow.com/a/40229934/332788