Python: Pandas Pd.Read_Excel Giving Importerror: Install Xlrd >= 0.9.0 for Excel Support

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

You can install openpyxl using pip install openpyxl and then try:

pd.read_excel('2018_pressures.xlsx', engine='openpyxl')

This is an alternative solution but it will work.

Having trouble with opening Excel file with Pandas

Very short description. It would be nice if the description was a little more detailed. Try install the module:

pip install xlrd

If using python3 then:

pip3 install xlrd

If you are using conda:

conda install -c anaconda xlrd

May be there are multiple python versions in the system, where requirement might be satisfied for one and not for the other. I faced such problem and python3 rather than pip3 worked for me. Check out this too.

python3 -m pip install xlrd

Then it must work, otherwise, upgrade.

pip3 install --upgrade pandas
pip3 install --upgrade xlrd

I hope this will work.

import xlrd
import pandas as pd

sp = pd.ExcelFile("data.xlsx")
print(sp.parse(sp.sheet_names[0]))

If it doesn't work even after the upgrade, my guess is that there is another problem that is not known from your description. (Please include the full error message in the description as a code block, not in image format.)



Related Topics



Leave a reply



Submit