[PYTHON] If you get a long error when tabbing an interactive shell with Anaconda

I think it is quite possible to use an interactive shell to check the results of a small program.

The basic operation of "error in tab operation after for statement" did not proceed easily, and I finally solved it, so I will share it as a private memorandum.

The one sentence that appears at the end of a fairly long error is 「AttributeError: module 'readline' has no attribute 'redisplay'」

Readline is a package that complements tab operations, but even if you search variously, only articles such as "Consider re-installing because there is a possibility that there is no version" appear, and even if you reinstall it, it is useless. I couldn't downgrade from the latest version 2.1 to "2.0".

The GitHub article that I finally arrived at is below https://github.com/pyreadline/pyreadline/issues/64

It's a little difficult to understand because it's only in English, but in "basemode.py" in the package I solved it by adding code to two places in the article.

Thanks to those who uploaded this article. (I first learned that GitHub can be used in this way.) Later, this package called readline doesn't seem to have been updated since around 2015, so I wondered if something went wrong.

Recommended Posts

If you get a long error when tabbing an interactive shell with Anaconda
Workaround if you get an error when trying to install PySide with pip
What to do if you get an error when installing python with pyenv
What to do if you get an OpenSSL error when installing Python 2 with pyenv
What to do if you get an Import Error when importing matplotlib with Jupyter
When I get an error with PyInstaller
What to do if you get an Undefined error when trying to use pip with pyenv
What to do if you get an error when trying to load mnist
What to do if you get an error when installing Dlib (Ubuntu)
When writing an if statement with a regular expression
When you get an error in python scraping (requests)
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
What to do if you get a memory error when converting from PySparkDataFrame to PandasDataFrame
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if you get an error when running "certbot renew" in CakePHP environment
What to do if you get a UnicodeDecodeError with pip install
If you get angry with "too few updates ~" when running LdaModel
If you should have pip installed but get an Import error
I get an OS Error: [Errno 8] Exec format error when running a Flask application with a python command
I get an error with import pandas.
If you get a Programming Error: (1146, "Table'<table name>' doesn't exist") in Django
What to do if an error occurs when importing numpy with VScode
What to do if you get a TypeError with numpy min, max
[Python] What to do if you get a ModuleNotFoundError when importing pandas using Jupyter Notebook in Anaconda
When you want a long line break
If you get a no attribute error in boto3, check the version
What to do if an error occurs when loading a python project created with poetry into VS Code
What to do if you get a "No versions found" error in pipenv
In the Chainer tutorial, I get an error when importing a package. (mock)
[Python] What to check when you get a Unicode Decode Error in Django
Error when installing a module with Python pip
I got an error when saving with OpenCV
How to get help in an interactive shell
I get a UnicodeDecodeError when running with mod_wsgi
[python] [vscode] When you get angry with space-tab-mixed
I get an error with all yum commands
Rollback processing when an error occurs with fabric
If you get lost with HTTP redirects 301 and 302
What to do if you get a Call with too many input arguments error at DoAndReturn in a golang test
What to do if you get an "unknown service" error from your gRPC server
A story about an error when loading a TensorFlow model created with Google Colab locally
What to do if you get the error ʻERR_FEATURE_UNAVAILABLE_ON_PLATFORM` when using ts-node-dev on Linux
What to do if you run python in IntelliJ and end with an error
If you get stuck when building pycocoapi on Windows
I get an error when I put opencv in pyautoGUI
I get an error when trying meinheld + WebSocket + mongodb
BigQuery-If you get a Reason: responseTooLarge error in Python
If you encounter a "Unicode Decode Error" in Python
What to do if you get an error when vagrant up when you enable public_network or private_network on Vagrant + Arch Linux → Install netctl
I got an error when using Tensorboard with Pytorch
[Python] If you create a file with the same name as the module to be imported, an Attribute Error will occur.
What to do when you get an error saying "Name resolution temporarily failed" on linux
If you have trouble importing between folders when creating a package with Cython, see this.
When reading an image with SimpleITK, there is a problem if there is Japanese in the path
Solution if the module is installed in Python but you get an error in Jupyter notebook
What to do if you get a Cannot retrieve metalink for repository error in yum
If you draw an Omikuji with a probability of 1% 100 times in a row, will you win once?
EC2 / Amazon Linux2: What to do if you get an "unable to execute'gcc': No such file or directory" error with pip install
I got a Value Error when using JUMAN ++ with PyKNP
Solution if you get 0xxx ascii coding error in superset
A story about installing matplotlib using pip with an error