根据您提供的信息,我重现了这个问题:

模块安装过程请参考以下内容:
如果你有多个python环境,请检查VS Code终端是否在使用选择的python环境(显示在VS Code左下角),如果不一样,请打开一个新的VS Code终端。( python --version
)

安装模块“pytube”。( pip install pytube
)
检查模块的位置:( pip show pytube
)

然后,请重新加载 VS Code 使其识别该模块:( F1
, Developer: Reload Window
)

参考:VS Code 中的 Python 环境。
于 2021-03-18T02:07:28.420 回答