gpt4 book ai didi

python - 导入错误: No module named readability

转载 作者:行者123 更新时间:2023-11-30 22:53:06 24 4
gpt4 key购买 nike

我安装了Python可读性:https://github.com/buriy/python-readability

我可以使用:

python -m readability.readability -u http://pypi.python.org/pypi/readability-lxml

但是当我在 readability.py 中使用并使用 python 命令运行它时:

from readability.readability import Document
import urllib
html = urllib.urlopen(url).read()

在.py文件中显示错误:

Traceback (most recent call last): File "", line 1, in File "readability.py", line 1, in from readability.readability import Document ImportError: No module named readability

最佳答案

我知道评论解决方案已经晚了,但以防万一有人像我一样在几分钟前需要它..

在 python3 中尝试安装 readability-lxml

$ pip3 install readability-lxml

它对我有效

关于python - 导入错误: No module named readability,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38321055/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com