gpt4 book ai didi

python - flake8.exceptions.FailedToLoadPlugin : Flake8 failed to load plugin "D" due to invalid syntax upon install

转载 作者:太空宇宙 更新时间:2023-11-03 20:00:06 25 4
gpt4 key购买 nike

我使用以下命令全局安装了 flake8 和 flake8 文档字符串:

sudo pip install flake8 flake8-docstrings

我尝试启动 flake8 但遇到此错误:

flake8 --version                      
Traceback (most recent call last):
File "/usr/local/bin/flake8", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/flake8/main/cli.py", line 18, in main
app.run(argv)
File "/usr/local/lib/python2.7/dist-packages/flake8/main/application.py", line 393, in run
self._run(argv)
File "/usr/local/lib/python2.7/dist-packages/flake8/main/application.py", line 380, in _run
self.initialize(argv)
File "/usr/local/lib/python2.7/dist-packages/flake8/main/application.py", line 363, in initialize
self.find_plugins()
File "/usr/local/lib/python2.7/dist-packages/flake8/main/application.py", line 199, in find_plugins
self.check_plugins.load_plugins()
File "/usr/local/lib/python2.7/dist-packages/flake8/plugins/manager.py", line 410, in load_plugins
plugins = list(self.manager.map(load_plugin))
File "/usr/local/lib/python2.7/dist-packages/flake8/plugins/manager.py", line 297, in map
yield func(self.plugins[name], *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/flake8/plugins/manager.py", line 408, in load_plugin
return plugin.load_plugin()
File "/usr/local/lib/python2.7/dist-packages/flake8/plugins/manager.py", line 165, in load_plugin
raise failed_to_load
flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "D" due to invalid syntax (checker.py, line 668).

最佳答案

我通过将 pydocstyle 降级到 3.0.0 修复了这个问题。

pip install pydocstyle=3.0.0

关于python - flake8.exceptions.FailedToLoadPlugin : Flake8 failed to load plugin "D" due to invalid syntax upon install,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59300546/

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