When I did not install the module "flask" in the Python environment currently used in VSCode:

Please use the command "pip --version" to check the source of the module installation tool "pip", the module is installed at this location:

Then, we can use the command "pip show flask" to check the installation location of the module "flask": (It checks whether the installation location of the module is consistent with the Python environment displayed in the lower left corner of VSCode.)

If the "reportMissingModuleSource" message is still displayed here, please reload VS Code.
(F1, Developer: Reload Window)

reportMissingModuleSource in apps.py of an empty Django project
VSCode isn't Recognizing Python Modules?
vs code - reportMissingModuleSource with venv
reportMissingModuleSource: Even if the module is successfully installed, a warning will still be displayed in the output.
Videos
When I did not install the module "flask" in the Python environment currently used in VSCode:

Please use the command "pip --version" to check the source of the module installation tool "pip", the module is installed at this location:

Then, we can use the command "pip show flask" to check the installation location of the module "flask": (It checks whether the installation location of the module is consistent with the Python environment displayed in the lower left corner of VSCode.)

If the "reportMissingModuleSource" message is still displayed here, please reload VS Code.
(F1, Developer: Reload Window)

Are you using a Virtualenv? If so make sure that VSCode is using the virtualenv as your python interpreter, otherwise it will not be able to pick up the packages that you installed inside this virtualenv.
To do so, click on the Python interpreter in your bottom bar, you should get a list of possible python interpreters including your virtualenv.
Noob here. Currently dealing with a very simple yet frustratingly difficult to resolve problem importing python modules.
When using pip install in the terminal I get a Requirement Already Satisfied response in the console, however in code when Import the module, I get the error code pasted at the bottom. I also get this issue if I create a Python file and try to import it in my main.py
I think the issue is the path they're getting installed in is not where VSCode is looking, but I've been unable to find a way to resolve it. Either that, or pip install is using a different instance of python that isn't what VSCode is using? Very annoying. If you have a solution, please let me know! Thanks!
[{
"resource": "/Documents/Coding/VSCode/Projects/Photoeditor/PhotoEditor.py",
"owner": "_generated_diagnostic_collection_name_#0",
"code": {
"value": "reportMissingModuleSource",
"target": {
"$mid": 1,
"external": "https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportMissingModuleSource",
"path": "/microsoft/pyright/blob/main/docs/configuration.md",
"scheme": "https",
"authority": "github.com",
"fragment": "reportMissingModuleSource"
}
},
"severity": 4,
"message": "Import \"requests\" could not be resolved from source",
"source": "Pylance",
"startLineNumber": 2,
"startColumn": 8,
"endLineNumber": 2,
"endColumn": 16
}]
When I did not install the module "flask" in the Python environment currently used in VSCode:

Please use the command "pip --version" to check the source of the module installation tool "pip", the module is installed at this location:

Then, we can use the command "pip show flask" to check the installation location of the module "flask": (It checks whether the installation location of the module is consistent with the Python environment displayed in the lower left corner of VSCode.)

If the "reportMissingModuleSource" message is still displayed here, please reload VS Code.
(F1, Developer: Reload Window)

Are you using a Virtualenv? If so make sure that VSCode is using the virtualenv as your python interpreter, otherwise it will not be able to pick up the packages that you installed inside this virtualenv.
To do so, click on the Python interpreter in your bottom bar, you should get a list of possible python interpreters including your virtualenv.