How to fix Python ImportError: lxml not found, please install it

The error message ImportError: lxml not found, please install it is a common message that Python programmers get when they try to run their scripts to scrape information from a website using Pandas.

ImportError

The ImportError: lxml not found, please install it error occurs when Python cannot find the lxml module. This module provides extra functions for working with XML files. The installation of lxml depends on the operating system and the Python version being used.

import-error-panda

In order to fix this error, we can install lxml using pip or setuptools.

pip install lxml

After installing lxml restart your kernel