python中使用vscode Import "matplotlib.pyplot" could not be resolved from source 问题

我使用的是conda的vscode

img


在pip list中已经安装了matplotlib包

img

img

这是什么原因?我应该怎么做去解决它?

缺失的包要安装在conda中,你要先进人虚拟环境在安装

conda install xxx