Python壳,箭头键,和水蟒环境

2024-06-16 09:50:40 发布

您现在位置:Python中文网/ 问答频道 /正文

我让水蟒在安特戈斯(拱门)上奔跑。如果我在shell中运行python,那么箭头键就可以正常工作了。如果我源代码激活了任何环境,箭头键会导致^[[A,等等。我记得在任何环境之外都有同样的问题,pip install readline解决了这个问题。但是,在conda环境中,箭头键就是不起作用。我尝试了pip install readline和easy_nuinstall-环境中的readline。没有欢乐。有什么办法解决这个问题吗?在

更新(回答PM 2ring的问题)

(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
>>> 

Tags: installpiporreadline环境源代码easyshell