0

Im using a centos 7 server, and runing Python 3.7.9 but the problem is that when i have the python's virtual enviroment activated, open the python shell, write anything and try to delete the caracter using the backspace key on the shell apear this simbol H^, or if i use the arrows key (up,down,left,right) they put ^[[A, ^[[B, ^[[C or ^[[D isnted of show the previous line. But if i deactivate the python's virtual enviroment i can use backspace and delete the characters or use the arrow keys without any problem.

I know that those symbols are the special character asociated with the key, but i dont know what cause this behaviour i try to search on google but i cant find anything that can help me. So if anyone can help me with a post, or other wuestion in here where the problem is solved i'll be gratefull.

There ir a screenshot of the shell. screenshot of python shell

juanpa.arrivillaga
  • 88,713
  • 10
  • 131
  • 172
  • possibly related to a lack of readline support, see: https://stackoverflow.com/questions/893053/seeing-escape-characters-when-pressing-the-arrow-keys-in-python-shell – juanpa.arrivillaga Mar 10 '22 at 23:17
  • as an aside, always use the generic [python] tag for all python-related questions, use the version-specific tags at your discretion... note, nowadays, Python *means Python 3* – juanpa.arrivillaga Mar 10 '22 at 23:20
  • thanks @juanpa.arrivillaga this post help me to solve the error. The solutions was install gnureadline using `$ pip install gnureadline` – Reiverth Canelon Mar 14 '22 at 15:27

0 Answers0