Solution with Pictures
Open the Command Palette with Ctrl + Shift + P key combinations and choose the Python: Select Linter command.

You will see different options for command, select prospector.

It asks you to install the necessary packages for the selected linter.

Install it and run the code in the terminal. After installing the packages, the problem will be resolved.
Another way (you can do both)

Open the Command Palette and select the Preferences: Open Settings (JSON) command.

Add the codes to the line
“python.linting.pylintArgs”: [“–reports”, “12”, “–disable”, “I0011”],
“python.linting.flake8Args”: [“–ignore=E24,W504”, “–verbose”],
“python.linting.pydocstyleArgs”: [“–ignore=D400”, “–ignore=D4”]

Save and get rid of the error
If these solutions don’t work, you can look at different solutions from here
- Module … has no member
- Class … has no objects in pylint(no-member)
thank you