Am new in flask development and trying to import flask in my project but Pylint
is giving this error in VSCode E0401:Unable to import \'flask
I guess VS Code doesn't use the correct virtualenv.
To select a virtualenv using the GUI, see Configuring Python environments.
If you use the terminal and have code
in your path, launch VS code from your workspace and the virtualenv will be loaded automatically:
cd python-workspace
code -n python-workspace
(note: the -n
is for new window)
If this does not work, ensure that pylint
is installed in your virtualenv (i.e. your are not using the global pylint
). If it still does not work, have a look at this troubleshooting guide.