擅长:python、mysql、java
<p>我也有同样的问题。对我有用的是:</p>
<ol>
<li>通过从命令面板(<code>Ctrl+Shift+P</code>)运行<code>Python: Select Interpreter</code>并选择正确的选项(它应该检测到您的虚拟环境并提出建议,但是如果没有,请尝试按照建议设置<code>python.pythonPath</code>,以及{<cd4>}和/或{<cd5>},以确保VS代码使用了正确的虚拟环境。也可以尝试在与项目相同的文件夹中创建虚拟环境)</li>
<li>从命令面板运行<code>Python: Select Linter</code>,然后选择pylint。在</li>
<li>然后我仍然需要改变一个字符,然后保存,使它开始起毛。在</li>
</ol>
<p>希望这有帮助。在</p>