错误消息“未安装 Linter pylint" [英] Error message "Linter pylint is not installed"

查看:53
本文介绍了错误消息“未安装 Linter pylint"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Microsoft Visual Studio Code 中运行 Python 代码,但出现错误:

I want to run Python code in Microsoft Visual Studio Code but it gives an error:

未安装 Linter pylint

Linter pylint is not installed

我安装了:

  • Visual Studio Code Python 扩展
  • Python 3
  • 蟒蛇

如何安装 Pylint?

How can I install Pylint?

推荐答案

  1. 打开一个终端(ctrl+~)
  2. 运行命令pip install pylint

如果这不起作用:如果您为编辑器配置了非默认 Python 路径,则需要将该 Python 的安装位置与您的 pip 可执行文件匹配正在从终端呼叫.

If that doesn't work: On the off chance you've configured a non-default Python path for your editor, you'll need to match that Python's install location with the pip executable you're calling from the terminal.

这是一个问题,因为 Python 扩展的 settings 启用了 Pylint 默认情况下.如果您希望关闭 linting,则可以在用户或工作区设置中将此设置从 true 更改为 false:

This is an issue because the Python extension's settings enable Pylint by default. If you'd rather turn off linting, you can instead change this setting from true to false in your user or workspace settings:

"python.linting.pylintEnabled": false

这篇关于错误消息“未安装 Linter pylint"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆