Reputation: 16113
When I run pylint
against my project, I get a lot of errors like this:
E0401: Unable to import 'boto3' (import-error)
However, in the FAQ I read:
Pylint doesn’t import any of the candidate modules and thus doesn’t include any of import’s side effects (good and bad). It traverses an AST representation of the code.
So when do these imports happen?
Upvotes: 0
Views: 278
Reputation: 4282
You need to launch pylint in an environment where the boto3 library is accessible. (A virtualenv where it's installed) pylint need to analyses those files and if they're not available they do not exists.
python3 -m venv venv
source venv/bin/activate
pip3 install boto3 pylint
pylint ...
Upvotes: 1