Python error "Module not found" while trying to read .xls file. How to install xlrd?

33 Views Asked by At

I was trying to import the xls file where I am getting this error.

ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.

Help me resoling this error. Error screenshot

Guidance in how to use pip or conda to install xlrd.

2

There are 2 best solutions below

0
HASEEB ALI On

You missed the dependency, below is the command to install it.

pip install xlrd

0
The Bounter On

You have not downloaded xlrd module. Python has certain modules and libraries that need to be installed on top of the built-in packages. For installing modules using pip, use the syntax pip install [module_name] where you can also put the version number(optional) specifically required for your usage with [module_name]==[version_no]

Try using pip install xlrd==1.1.0. That will install your module in your local Python system.

If you want details, the documentation for this module can be found here :

For latest version (2.0.1) - https://pypi.org/project/xlrd/

For your required version (1.1.0) - https://pypi.org/project/xlrd/1.1.0/