Answer the question
In order to leave comments, you need to log in
How do I enable Python code completion in VS Code in a virtual environment?
Without a virtual environment, everything works fine. As soon as I create an environment and activate it, any analysis of the code disappears, even within one module (file).
I even tried including libraries in "python.autoComplete.extraPaths"
.
{
"python.pythonPath": "C:\\Users\\abukreev\\Documents\\Git\\flask_test\\Scripts\\python.exe",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.analysis.cachingLevel": "Library",
"python.analysis.memory.keepLibraryAst": true,
"python.analysis.memory.keepLibraryLocalVariables": true,
"python.autoComplete.extraPaths": [
"C:\\Users\\abukreev\\Documents\\Git\\flask_test\\Lib\\site-packages"
]
}
Version: 1.48.1 (user setup)
Commit: 3dd905126b34dcd4de81fa624eb3a8cbe7485f13
Date: 2020-08-19T17:12:13.244Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18362
Python plug-in
2020.8.103604 (20 August 2020)
Answer the question
In order to leave comments, you need to log in
By the method of scientific poke, such a solution was found.
You need to add the following parameters to the settings.json of the project
"python.autoComplete.extraPaths": [
"./Lib/site-packages"
],
"python.analysis.downloadChannel": "dayli",
"python.languageServer": "Microsoft"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question