擅长:python、mysql、java
<p>由于您使用的是虚拟环境,首先需要在这个虚拟环境中安装Pylint<em>。</p>
<p>此外,您需要将以下条目添加到工作区设置中,以避免出现<code>[pylint] E0401</code>错误:</p>
<pre class="lang-python prettyprint-override"><code>"python.linting.pylintPath": "/path/to/your/virtualenv/bin/pylint"
</code></pre>
<p>这将覆盖用户设置(全局设置),并指示VSCode在虚拟env</em>中使用Pylint版本<em>(而不是<em>全局</em>版本)。这可能是你遗漏的一点;-)</p>