I have created a myutils.py
file, added it to PYTHONPATH
via .bashrc
and it correctly gets imported during the actual runtime.
However, when i'm viewing the file that imports the library in vscode, it doesn't recognize it and gives me the warning Import "myutils" could not be resolved PylancereportMissingImports
.
How do i show vscode that i'd like it to cache the contents of my custom module?
CodePudding user response:
Choosing the interpreter might help solve the problem.
CodePudding user response:
In settings.json
file you have to add the paths from which folder you import myutils
:
"python.analysis.extraPaths": [
"<path to the folder that contains myutils.py>",
]