.. _import-error:

import-error / E0401
====================

**Message emitted:**

Unable to import %s

**Description:**

*Used when pylint has been unable to import a module.*

**Problematic code:**

.. literalinclude:: /data/messages/i/import-error/bad.py
   :language: python

**Correct code:**

.. literalinclude:: /data/messages/i/import-error/good.py
   :language: python

**Additional details:**

This can happen if you're importing a package that is not installed in your environment, or if you made a typo.

The solution is to install the package via pip/setup.py/wheel or fix the typo.


Created by the `imports <https://github.com/PyCQA/pylint/blob/main/pylint/checkers/imports.py>`__ checker.