I have been looking all over the internet and spent hours trying to fix this.
Summary of the issue:
Unable to import 'x' pylint (import-error)
(image #1)What I tried:
pip install pylint
) and selected it as a linter through Vs codecmd+shift+p
-> Developer: Reload window)"env": {"PYTHONPATH": "${workspaceRoot}"}
to launch.json file"python.linting.enabled": true
and "python.analysis.autoImportCompletions": true
to settings.json fileMy project structure:
my-app/
├─ venv/
├─ errors/
│ ├─ __init__.py
│ ├─ interface
├─ _app.py
├─ __init__.py
Notes:
__init__.py
fileMy system
I was able to solve the first issue by deleting the __init__.py
file from the root folder of my project.
Regarding the second issue, as MingJie-MSFT commented - it is an issue from 2019.
That being said - I was able to (partially) solve it, by installing the Sourcery extension for vscode.