close

[Solved] ImportError: No module named ‘xlrd’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ImportError: No module named ‘xlrd’ in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ImportError: No module named ‘xlrd’ Error Occurs?

Today I get the following error ImportError: No module named ‘xlrd’ in python.

How To Solve ImportError: No module named ‘xlrd’ Error ?

  1. How To Solve ImportError: No module named 'xlrd' Error ?

    To Solve ImportError: No module named 'xlrd' Error Running the pip install xlrd completed the installation, but that did not resolve the “no named module named xlrd” error.

  2. ImportError: No module named 'xlrd'

    To Solve ImportError: No module named 'xlrd' Error Running the pip install xlrd completed the installation, but that did not resolve the “no named module named xlrd” error.

Solution 1

I had the same problem. I went to the terminal (Using Linux), and typed

sudo pip3 install xlrd

Then I imported xlrd in python and used the same code:

df = pd.read_excel("File.xlsx", "Sheet1")
print (df)

It worked for me!!

Solution 2

Running the pip install xlrd completed the installation, but that did not resolve the “no named module named xlrd” error.

Copying the xlrd folder to the same folder where the .py programs are stored, resolved this issue.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read