python - ModuleNotFoundError:没有名为“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'
这里再试一次。
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$
我收到此错误,但我已经安装了 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
您正在 Python 2 上运行 Setuptools,该版本不再受支持,并且 SETUPTOOLS 将在后续版本(不早于 2020-04-20)中停止工作。请确保您
setuptools<45
在您的环境中使用 pip 9.x 或更高版本或 pin 安装 Setuptools。如果您已经完成了这些操作并且仍然遇到此消息,请在警告:旧脚本包装器正在调用 pip。这将在 pip 的未来版本中失败。请参阅 https://github.com/pypa/pip/issues/5599以获取有关解决潜在问题的建议。为避免此问题,您可以使用“-m pip”调用 Python,而不是直接运行 pip。弃用:Python 2.7 已于 2020 年 1 月 1 日结束其生命周期。请升级您的 Python,因为不再维护 Python 2.7。未来版本的 pip 将不再支持 Python 2.7。有关 pip 中 Python 2 支持的更多详细信息, 请参见https://pip.pypa.io/en/latest/development/release-process/#python-2-support 已满足要求:./.local/ 中的 readline lib/python2.7/site-packages (6.2.4.1) tushar@tushar:~$
解决方案
推荐阅读
- css - 使用主题tokenColors的VS代码webview css变量名称
- azure - 运行管道时 Azure 数据工厂 v2“属性‘类型’的值无效”
- django - Geodjango 的 Beanstalk 迁移失败
- python - 向 Iphone 发送消息
- pdf - 如何从“每张 2 页”PDF 中提取页面?
- node.js - 如何在不创建模型的情况下插入对模型的引用?
- php - Stripe 支付网关不接受 Visa/Master 借记卡
- javascript - 为什么返回默认情况而不是在 Redux 的 reducer 中抛出?
- c# - C# Web 应用程序 - 在每次页面加载时运行特定类型的代码
- c# - 在卸载或升级之前运行自定义操作