Python arrow key not working ^[[A ^[[B ^[[C ...
Posted 2021. 3. 22. 11:16TR;DL
1. Simply hack way.
python -m pip install gnureadline
2. Correct way(require python reinstall)
sudo apt install libreadline-dev
sudo apt install libbz2-dev
sudo apt install libsqlite3-dev
# Python reinstall
pyenv uninstall 3.8.8
pyenv install 3.8.8
Description
If python binary doesn't have the "readline" library, key codes like "^[[A" show in the command line; It might be probably seen when you are using 'pyenv'. We can check whether we face this problem by warning logs while installing.
In my case, I already installed libreadline and there is no warning log on readline. But, two warning logs still exist. So, I will solve these problems.
apt install libreadline-dev
apt install libbz2-dev
apt install libsqlite3-dev
And now that, there is no warning log.
- Filed under : 카테고리 없음