1
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:~$

Adam Strauss
  • 1,761
  • 2
  • 12
  • 41
Tushar Patil
  • 33
  • 1
  • 4
  • 3
    Try to use `pip3`. It seems like you are installing Python 2 packeges – Tomerikoo Sep 16 '20 at 14:00
  • 1
    The long term solution, as noted in [this question](https://stackoverflow.com/a/4910393/7867968) is to use `python -m pip install ` to ensure you are using the correct pip/python – C.Nivs Sep 16 '20 at 14:03

0 Answers0