报错显而易见:
Traceback (most recent call last):
File "D:\DataManagement\PCG_NPI\Processor_New.py", line 179, in <module>
df = pd.read_excel(file_path)
File "C:\Users\****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\util\_decorators.py", line 311, in wrapper
return func(*args, **kwargs)
File "C:\Users\****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\excel\_base.py", line 364, in read_excel
io = ExcelFile(io, storage_options=storage_options, engine=engine)
File "C:\Users\****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\excel\_base.py", line 1233, in __init__
self._reader = self._engines[engine](self._io, storage_options=storage_options)
File "C:\Users\****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\io\excel\_openpyxl.py", line 521, in __init__
import_optional_dependency("openpyxl")
File "C:\Users\****\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pandas\compat\_optional.py", line 141, in import_optional_dependency
raise ImportError(msg)
ImportError: Pandas requires version '3.0.0' or newer of 'openpyxl' (version '2.5.12' currently installed).
直译过来就是:pandas要求‘3.0.0’或更新版本的openpyxl(当前版本为‘2.5.12’),根据提示升级对应版本就好~
?
|