问题
I am using Visual Studio Code to work on a large python project with many modules.
My settings.json
looks like this:
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.autoComplete.extraPaths": [
"C:/Users/.../repos/platform",
],
"python.linting.pylintPath": "pylint"
}
After that inside the code. I am getting a ton of error on all import modules which are inside the platform-folder. I have python3 installed with python extensions and pylint installed as well.
I have searched for over an another and tried many different suggestions but none has worked for me so far.
回答1:
The Current Problem you are facing is not regarding code formatting (by pylint).
you would rather want to choose the interpreter you want to have Intellisense for.
they are provided in docs as followed. link.
Hope this helps.
If it's TL;DR for you.
just press F1 on vscode
window and type Python:Select
you will get right prompts.
来源:https://stackoverflow.com/questions/53007966/visual-studio-code-pylint-complaining-about-unable-to-import-xxx