Tushar Patil
Tushar Patil

Reputation: 113

ModuleNotFoundError: No module named 'readline'

tushar@tushar:~/ghost$ sudo ghost
[sudo] password for tushar: 

Traceback (most recent call last):
  File "./ghost", line 9, in <module>
    import readline
ModuleNotFoundError: No module named 'readline'

Here another try.

tushar@tushar:~/ghost$ 
tushar@tushar:~/ghost$ sudo ghost
Traceback (most recent call last):
  File "./ghost", line 9, in <module>
    import readline
ModuleNotFoundError: No module named 'readline'
tushar@tushar:~/ghost$ 

I got this error but i already installed readline ...

tushar@tushar:~$ pip install readline
/usr/share/python-wheels/pkg_resources-0.0.0-py3-none-any.whl/pkg_resources/py2_warn.py:21: UserWarning: Setuptools will stop working on Python 2

You are running Setuptools on Python 2, which is no longer supported and SETUPTOOLS WILL STOP WORKING in a subsequent release (no sooner than 2020-04-20). Please ensure you are installing Setuptools using pip 9.x or later or pin to setuptools<45 in your environment. If you have done those things and are still encountering this message, please follow up at

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Requirement already satisfied: readline in ./.local/lib/python2.7/site-packages (6.2.4.1) tushar@tushar:~$

Upvotes: 6

Views: 26130

Answers (2)

Sakeador
Sakeador

Reputation: 69

Probably just for Linux, right?

"Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [1 lines of output] error: this module is not meant to work on Windows [end of output]"

TY!

Edit: that's the Win readline version "pyreadline3"

So just run:

$pip install pyreadline3

And you're done :)

Upvotes: 1

user21504460
user21504460

Reputation: 141

sudo apt install libreadline-dev

or

pip install readline

Upvotes: 14

Related Questions