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

Hi,

I try to deploy my app with the fantastic Streamlit Sharing, but the app is unable to open up the Excel file in there: ImportError: Missing optional dependency ‘xlrd’. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.

Locally, everything is fine; but when it comes to deploying the app, I get stuck on this.

Many thanks for your help.

If you’re opening an xlsx file using pd.read_excel(), you will need openpyxl. See pandas docs here.

openpyxl is already installed on my computer for a while tho …

Is it installed in production, and have you tried to set it as the pandas reader engine?

Yes I tried … but get again an error message.

It’s important to realize that having something installed locally is completely separate than having it installed on Streamlit sharing. We can’t read your local computer :slight_smile:

Best,
Randy

Thanks Randy for your answer.

I know this perfectly: I’ve updated my requirements.txt file accordingly, but this doesn’t solve my issue.

Can you post a link to your code?

I submitted a pull request that fixes this as far as I can tell:

Best,
Randy

Thanks so very much Randy !

This is really appreciated.

1 Like