Reputation: 6495
I've got anaconda running on antergos (arch). If I run python in a shell, the arrow keys work fine. If I source activate any environment, the arrow keys result in ^[[A, etc. I remember having the same problem outside of any environment, and pip install readline got rid of the issue. However, inside a conda environment, the arrow keys are just not working. I tried pip install readline, and easy_install -a readline from within the environment. No joy. Any idea on how to resolve this?
Update (to answer PM 2ring's question)
(tf) ~ python
Python 3.6.1 |Continuum Analytics, Inc.| (default, Mar 22 2017, 19:54:23)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libncursesw.so.5: cannot open shared object file: No such file or directory
>>>
Upvotes: 0
Views: 1207
Reputation: 491
For me in Ubuntu 18.04. Uninstall any other versions in the virtual environment and reinstall with conda and -c. Even with just conda install readline it didnt seem to fix it.
pip uninstall readline
conda install -c anaconda readline
Upvotes: 0
Reputation: 6495
It seems related to ncurses versions, etc. It works fine after I ran the following inside the conda environment:
conda install ncurses
Upvotes: 3