gpt4 book ai didi

python - 在 Spyder 上分析代码 (pylint) 时出错

转载 作者:行者123 更新时间:2023-12-04 12:29:22 30 4
gpt4 key购买 nike

我使用 Spyder 5 (Python 3.7.9),虽然我也安装了 Python 3.9 但没有安装 Spyder。
当我按 F8 运行静态分析代码时,会显示一条消息:

Traceback (most recent call last):
File "D:\obj\windows-release 37amd64_Release\msi_python\zip_amd64\runpy.py", line 193, in
_run_module_as_main
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\runpy.py", line 85, in
_run_code
File "C:\Program Files\Spyder\pkgs\pylintmain.py", line 9, in <<module> pylint.run_pylint()
File "C:\Program Files\Spyder\pkgs\pylint_init.py", line 21, in run_pylint from pylint.lint import Run as PylintRun
File "C:\Program Files\Spyder pkgs\pylint\lint_init.py", line 75, in <module> from pylint.lint.parallel import check_parallel
File "C:\Program Files\Spyder\pkgs\pylint\lint\parallel.py", line 7, in <module>
from pylint import reporters File "C:\Program Files\Spyder\pkgs\pylint\reportersinit.py", line 25, in <module>
from pylint import utils
File "C:\Program Files\Spyder\pkgs\pylint\utils_init__.py", line 45, in <module>
from pylint.utils.ast walker import ASTWalker
File "C:\Program Files\Spyder\pkgs\pylint\utils\ast_walker.py", line 6, in <module>
from astroid import nodes
File "C:\Program Files\Spyder\pkgs\astroidinit.py", line 46, in <module>
from pathlib import Path
ModuleNotFoundError: No module named 'pathlib'
在安装 Spyder 5 之前(我有 Spyder 3),它可以工作,但自从我更新了 Spyder,它就不会了。
谢谢!

最佳答案

(此处是 Spyder 维护者)这是我们 Windows 安装程序中的一个错误,我们将尝试在下一个版本中修复它,该版本将于 6 月发布。

关于python - 在 Spyder 上分析代码 (pylint) 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67470701/

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