Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support

前端 未结 15 2099
太阳男子
太阳男子 2021-02-01 12:04

I am trying to read a .xlsx with pandas, but get the follwing error:

data = pd.read_excel(low_memory=False, io=\"DataAnalysis1/temp1.xlsx\").fillna(         


        
15条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-01 12:26

    Another possibility, is the machine has an older version of xlrd installed separately, and it's not in the "..:\Python27\Scripts.." folder.

    In another word, there are 2 different versions of xlrd in the machine.

    when you check the version below, it reads the one not in the "..:\Python27\Scripts.." folder, no matter how updated you done with pip.

    print xlrd.__version__
    

    Delete the whole redundant sub-folder, and it works. (in addition to xlrd, I had another library encountered the same)

提交回复
热议问题