E0401 import-error

Message

'Unable to import %s'

Description

Used when pylint has been unable to import a module.

False positive: Missing dependency

In the following example, we run pylint in an enviroment where we miss the dependecy that provides the modules some_lib and some_other_lib.

import some_other_lib
from some_lib import some_name
1:0: E0401: Unable to import 'some_other_lib'
2:0: E0401: Unable to import 'some_lib'

Running Pylint locally? In your CI?

There is a better way! Run PyCodeQual & get Pylint findings with history, diffs and statistics.

Click here to find out more.