gpt4 book ai didi

python - 属性错误 : module 'html5lib.treebuilders.etree' has no attribute 'getETreeModule'

转载 作者:行者123 更新时间:2023-12-04 14:48:57 25 4
gpt4 key购买 nike

求建议,谢谢:)

pip list --outdated --format=freeze
给出以下错误:
ERROR: Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 223, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 175, in run
packages = self.get_outdated(packages, options)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 184, in get_outdated
return [
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 184, in <listcomp>
return [
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 237, in iter_packages_latest_infos
for dist in map_multithread(latest_info, packages):
File "/usr/lib/python3.9/multiprocessing/pool.py", line 870, in next
raise value
File "/usr/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line 214, in latest_info
all_candidates = finder.find_all_candidates(dist.key)
File "/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py", line 825, in find_all_candidates
package_links = self.process_project_url(
File "/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py", line 793, in process_project_url
page_links = list(parse_links(html_page))
File "/usr/lib/python3/dist-packages/pip/_internal/index/collector.py", line 324, in wrapper_wrapper
return list(fn(page))
File "/usr/lib/python3/dist-packages/pip/_internal/index/collector.py", line 335, in parse_links
document = html5lib.parse(
File "/usr/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl/html5lib/html5parser.py", line 44, in parse
tb = treebuilders.getTreeBuilder(treebuilder)
File "/usr/share/python-wheels/html5lib-1.1-py2.py3-none-any.whl/html5lib/treebuilders/__init__.py", line 85, in getTreeBuilder
return etree.getETreeModule(implementation, **kwargs).TreeBuilder
AttributeError: module 'html5lib.treebuilders.etree' has no attribute 'getETreeModule'

最佳答案

我解决了更新 pip 的问题,我从 pip 20.3.4 更新到 21.3
所以只需输入:

pip install pip -U
似乎 pip 本身存在一些错误。
Screenshot of the resolution of the problem

关于python - 属性错误 : module 'html5lib.treebuilders.etree' has no attribute 'getETreeModule' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69390411/

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