Fix Python Pandas Read Excel File – ImportError: Missing optional dependency ‘xlrd’

By | April 7, 2020

Python pandas read_excel() can allow us to read an excel file easily, however, you may find this ImportError: Missing optional dependency ‘xlrd’. In this tutorial, we will fix this error with some steps.

This import error likes:

python pandas read excel - import error - missing optional dependency xlrd

How to fix this importerror?

Install python xlrd package

We can use pip install command to install xlrd package.

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xlrd

Here we use pip https://pypi.tuna.tsinghua.edu.cn/simple mirror to install.

python pip install xlrd

Then we will find this import error is fixed and we can read excel file successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *