Python xlrd.biffh.XLRDError: Excel xlsx file; not supported

处xlsl格式的excel文件时,报错:

File "D:Python37libsite-packagesxlrd\__init__.py", line 170, in open_workbook

raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
xlrd.biffh.XLRDError: Excel xlsx file; not supported

问题原因:

  安装的 xlrd-2.0.1,该版本只支持.xls文件

  使用 pd.read_excel("2015Cities-CHINA.xlsx") 报错

解决方法:

  卸载当前安装的xlrd

pip uninstall xlrd

  安装低版本的xlrd

pip install xlrd==1.2.0
原文地址:https://www.cnblogs.com/tonyxiao/p/15048217.html