No module named 'xlrd' or Missing optional dependency 'xlrd' when read .xls file

105 Views Asked by At

Hi I was using pandas to read an .xls file, since it's the old version Excel file, I specified the engine = "xlrd". However it says Missing optional dependency 'xlrd' or No module named 'xlrd' when I was trying to import it. I looked through all the method on the website, it still does not work.

Some methods I've tried:

  1. which python -> its under ../.../venv/bin/python
  2. pip3 install xlrd or pip install xlrd or conda install xlrd it shows Requirement already satisfied
  3. pip install --upgrade xlrd -----> Requirement already satisfied
  4. pip list ---> it clearly shows package xlrd and the version is 2.0.1
  5. I tried restart the kernel and restart the VScode and even reactivate my venv. Still Missing optional dependency 'xlrd' when I tried to use pd.read or No module named 'xlrd' when I tried to import this module.

Can any one help me on that how to properly use the xlrd module or xlrd engine... to get that .xls file read.

Thanks!

0

There are 0 best solutions below