from pytube import Youtube
Based on the information you provided, I reproduced this problem:
Please refer to the following to check the installation process of the module:
If you have multiple python environments, please check whether the VS Code terminal is using the selected python environment (shown in the lower left corner of VS Code), if they are not the same, please open a new VS Code terminal. (python --version
)
Install the module "pytube". (pip install pytube
)
Check the location of the module: (pip show pytube
)
Then, please reload VS Code to make it recognize this module:(F1
, Developer: Reload Window
)
Reference: Python environment in VS Code.