<div dir="ltr">Just so that my example code can be used as written I attach minimal spreadsheets blah.xls and blah.xlsx.<div><br></div><div>I note that a work-around is to uninstall the debian package of python3-xlrd, install python3-pip (if you do not have it already) and to do:</div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">pip3 install --break-sys</span>tem-packages --user xlrd<br></span><div><br></div><div>This will (at the time of writing) install <span style="color:rgb(0,0,0);font-family:monospace">xlrd-2.0.1 , after which the line</span></div><div><span style="color:rgb(0,0,0);font-family:monospace"><br></span></div><div>foo=pd.read_excel("blah.xls")<span style="color:rgb(0,0,0);font-family:monospace"></span></div><div><br></div><div>works as intended.</div><div><br></div><div>For reference, the full error message was:</div><div><br></div><div><span style="font-family:monospace"><span style="color:rgb(24,178,24)">In [</span><span style="font-weight:bold;color:rgb(84,255,84)">120</span><span style="color:rgb(24,178,24)">]: </span><span style="color:rgb(0,0,0)">foo=pd.read_excel(</span><span style="color:rgb(178,104,24)">"blah.xls"</span><span style="color:rgb(0,0,0)">)
</span><br><span style="color:rgb(178,24,24)">---------------------------------------------------------------------------</span><span style="color:rgb(0,0,0)">
</span><br><span style="color:rgb(178,24,24)">ImportError</span><span style="color:rgb(0,0,0)"> Traceback (most recent call last)
</span><br>Cell <span style="color:rgb(24,178,24)">In [120], line 1</span><span style="color:rgb(0,0,0)">
</span><br><span style="color:rgb(24,178,24)">----> 1</span><span style="color:rgb(0,0,0)"> foo</span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">pd</span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">.</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">read_excel(</span><span style="color:rgb(175,0,0);background-color:rgb(178,104,24)">"blah.xls"</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">)</span><span style="color:rgb(0,0,0)">
</span><br>
<br>File <span style="color:rgb(24,178,24)">/usr/lib/python3/dist-packages/pandas/util/_decorators.py:211</span><span style="color:rgb(0,0,0)">, in </span><span style="color:rgb(24,178,178)">deprecate</span><br>_kwarg.<locals>._deprecate_kwarg.<locals>.wrapper<span style="color:rgb(24,24,178)">(*args, **kwargs)</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 209</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">else</span><span style="color:rgb(0,0,0)">:
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 210</span><span style="color:rgb(0,0,0)"> kwargs[new_arg_name] </span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)"> new_arg_value
</span><br><span style="color:rgb(24,178,24)">--> 211</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">return</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">func(</span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">*</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">args, </span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">**</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">kwargs)</span><span style="color:rgb(0,0,0)">
</span><br>
<br>File <span style="color:rgb(24,178,24)">/usr/lib/python3/dist-packages/pandas/util/_decorators.py:331</span><span style="color:rgb(0,0,0)">, in </span><span style="color:rgb(24,178,178)">deprecate</span><br>_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper<span style="color:rgb(24,24,178)">(*args, **kwargs)</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 325</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">if</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,135,0)">len</span><span style="color:rgb(0,0,0)">(args) </span><span style="color:rgb(98,98,98)">></span><span style="color:rgb(0,0,0)"> num_allow_args:
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 326</span><span style="color:rgb(0,0,0)"> warnings</span><span style="color:rgb(98,98,98)">.</span><span style="color:rgb(0,0,0)">warn(
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 327</span><span style="color:rgb(0,0,0)"> msg</span><span style="color:rgb(98,98,98)">.</span><span style="color:rgb(0,0,0)">format(arguments</span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)">_format_argument_list(allow_args)),
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 328</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(215,95,95)">FutureWarning</span><span style="color:rgb(0,0,0)">,
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 329</span><span style="color:rgb(0,0,0)"> stacklevel</span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)">find_stack_level(),
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 330</span><span style="color:rgb(0,0,0)"> )
</span><br><span style="color:rgb(24,178,24)">--> 331</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">return</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">func(</span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">*</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">args, </span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">**</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">kwargs)</span><span style="color:rgb(0,0,0)">
</span><br>
<br>File <span style="color:rgb(24,178,24)">/usr/lib/python3/dist-packages/pandas/io/excel/_base.py:482</span><span style="color:rgb(0,0,0)">, in </span><span style="color:rgb(24,178,178)">read_excel</span><span style="color:rgb(24,24,178)">(</span><br>io, sheet_name, header, names, index_col, usecols, squeeze, dtype, engine, conve<br>rters, true_values, false_values, skiprows, nrows, na_values, keep_default_na, n<br>a_filter, verbose, parse_dates, date_parser, thousands, decimal, comment, skipfo<br>oter, convert_float, mangle_dupe_cols, storage_options)<span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 480</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">if</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(175,0,255)">not</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,135,0)">isinstance</span><span style="color:rgb(0,0,0)">(io, ExcelFile):
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 481</span><span style="color:rgb(0,0,0)"> should_close </span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">True</span><span style="color:rgb(0,0,0)">
</span><br><span style="color:rgb(24,178,24)">--> 482</span><span style="color:rgb(0,0,0)"> io </span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">ExcelFile(io, storage_options</span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">=</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">storage_options, engine</span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">=</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">engine)</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 483</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">elif</span><span style="color:rgb(0,0,0)"> engine </span><span style="font-weight:bold;color:rgb(175,0,255)">and</span><span style="color:rgb(0,0,0)"> engine </span><span style="color:rgb(98,98,98)">!=</span><span style="color:rgb(0,0,0)"> io</span><span style="color:rgb(98,98,98)">.</span><span style="color:rgb(0,0,0)">engine:
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 484</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">raise</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(215,95,95)">ValueError</span><span style="color:rgb(0,0,0)">(
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 485</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(175,0,0)">"Engine should not be specified when passing "</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 486</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(175,0,0)">"an ExcelFile - ExcelFile already has the engine set"</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 487</span><span style="color:rgb(0,0,0)"> )
</span><br>
<br>File <span style="color:rgb(24,178,24)">/usr/lib/python3/dist-packages/pandas/io/excel/_base.py:1695</span><span style="color:rgb(0,0,0)">, in </span><span style="color:rgb(24,178,178)">ExcelFile.</span><br>__init__<span style="color:rgb(24,24,178)">(self, path_or_buffer, engine, storage_options)</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 1692</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,135,0)">self</span><span style="color:rgb(98,98,98)">.</span><span style="color:rgb(0,0,0)">engine </span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)"> engine
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 1693</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,135,0)">self</span><span style="color:rgb(98,98,98)">.</span><span style="color:rgb(0,0,0)">storage_options </span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)"> storage_options
</span><br><span style="color:rgb(24,178,24)">-> 1695</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,135,0)">self</span><span style="color:rgb(98,98,98)">.</span><span style="color:rgb(0,0,0)">_reader </span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,135,0);background-color:rgb(178,104,24)">self</span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">.</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">_engines[engine](</span><span style="color:rgb(0,135,0);background-color:rgb(178,104,24)">self</span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">.</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">_io, storage_options</span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">=</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">storage_o</span><br>ptions)<span style="color:rgb(0,0,0)">
</span><br>
<br>File <span style="color:rgb(24,178,24)">/usr/lib/python3/dist-packages/pandas/io/excel/_xlrd.py:34</span><span style="color:rgb(0,0,0)">, in </span><span style="color:rgb(24,178,178)">XlrdReader._</span><br>_init__<span style="color:rgb(24,24,178)">(self, filepath_or_buffer, storage_options)</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 24</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(175,0,0)">"""</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 25</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(175,0,0)">Reader using xlrd engine.</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 26</span><span style="color:rgb(0,0,0)"> </span><br><span style="color:rgb(24,178,24)"> (...)</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 31</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(175,0,0)">{storage_options}</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 32</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(175,0,0)">"""</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 33</span><span style="color:rgb(0,0,0)"> err_msg </span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(175,0,0)">"Install xlrd >= 1.0.0 for Excel support"</span><span style="color:rgb(0,0,0)">
</span><br><span style="color:rgb(24,178,24)">---> 34</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">import_optional_dependency(</span><span style="color:rgb(175,0,0);background-color:rgb(178,104,24)">"xlrd"</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">, extra</span><span style="color:rgb(98,98,98);background-color:rgb(178,104,24)">=</span><span style="color:rgb(0,0,0);background-color:rgb(178,104,24)">err_msg)</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 35</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(0,135,0)">super</span><span style="color:rgb(0,0,0)">()</span><span style="color:rgb(98,98,98)">.</span><span style="color:rgb(0,0,255)">__init__</span><span style="color:rgb(0,0,0)">(filepath_or_buffer, storage_options</span><span style="color:rgb(98,98,98)">=</span><span style="color:rgb(0,0,0)">storage_options)
</span><br>
<br>File <span style="color:rgb(24,178,24)">/usr/lib/python3/dist-packages/pandas/compat/_optional.py:176</span><span style="color:rgb(0,0,0)">, in </span><span style="color:rgb(24,178,178)">import_op</span><br>tional_dependency<span style="color:rgb(24,24,178)">(name, extra, errors, min_version)</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 174</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">return</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">None</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 175</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">elif</span><span style="color:rgb(0,0,0)"> errors </span><span style="color:rgb(98,98,98)">==</span><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(175,0,0)">"raise"</span><span style="color:rgb(0,0,0)">:
</span><br><span style="color:rgb(24,178,24)">--> 176</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">raise</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(215,95,95)">ImportError</span><span style="color:rgb(0,0,0)">(msg)
</span><br><span style="font-weight:bold;color:rgb(84,255,84)"> 178</span><span style="color:rgb(0,0,0)"> </span><span style="font-weight:bold;color:rgb(0,135,0)">return</span><span style="color:rgb(0,0,0)"> module
</span><br>
<br><span style="color:rgb(178,24,24)">ImportError</span><span style="color:rgb(0,0,0)">: Pandas requires version '2.0.1' or newer of 'xlrd' (version '1.2.0'</span><br> currently installed).<br>
<br></span></div></div></div>