属性错误:LooseVersion 实例没有属性"版本"



我正在研究一个python程序,该程序读取parquet类型文件并将其转换为pandas dataframe。当我使用Python命令运行它时,它可以正常工作(Python Framework1.py arg1 arg2)。但是,使用Pyinstaller将其转换为可执行文件后,当可执行文件运行时,它会产生以下错误。

Traceback (most recent call last):
  File "framework1.py", line 325, in <module>
  File "filetype.py", line 24, in fileTypeSelector
  File "pandas/io/parquet.py", line 256, in read_parquet
  File "pandas/io/parquet.py", line 38, in get_engine
  File "pandas/io/parquet.py", line 89, in __init__
  File "distutils/version.py", line 296, in __cmp__
AttributeError: LooseVersion instance has no attribute 'version'
[17249] Failed to execute script framework1

预先感谢:)

我通过使用fastparquet引擎而不是使用pyarrow解决了问题。

df1 = pd.read_parquet(filepath,Engine ='fastparquet')

最新更新