Vscode Unable To Import 'example' Pylint(import-error)
I am getting pylint errors in VSCode that say they are unable to import local files. However, I am able to run the files through the debugger with no problem. I thought that pylint
Solution 1:
Do you have __init__.py
files inside those folders? Otherwise python won't recognise them as modules and will be unable to import the code. Have a look at https://stackoverflow.com/a/448279/5015356 for more information
Solution 2:
The problem is that you specified a PYTHONPATH
for the debugger and not the general extension to send to Pylint. Try setting PYTHONPATH
in a .env
environment variable definition file.
Post a Comment for "Vscode Unable To Import 'example' Pylint(import-error)"