AttributeError:类型对象'pandas._libs.tslib._TSObject'没有属性'_reduce_cython_'

问题描述 投票:0回答:4

我为卷积神经网络创建了一个tkinter应用程序来识别图像。我试图用pyinstaller编译py文件,但我收到此错误:

AttributeError:类型对象'pandas._libs.tslib._TSObject'没有属性'_reduce_cython_'

我还附上了错误error的屏幕截图

python-3.6 pyinstaller
4个回答
1
投票

当我尝试为测试目的创建一个未完成项目的应用程序时,这个问题恰好发生在我身上。

我导入了pandas,但我没有在我的脚本中调用它。

删除导入行或调用pandas是解决方案。


0
投票

我用它解决了..

pyinstaller --onefile --hidden-import pandas._libs.tslibs.timedeltas myScript.py and it is working now

0
投票

你也需要cython,

  1. pip install cythonconda install cython
  2. pyinstaller --onefile --hidden-import pandas._libs.tslibs.timedeltas program.py

-1
投票

如果你正在使用Jupyter笔记本,请重新启动。它对我有用。还要确保您正在使用正确的python环境。

© www.soinside.com 2019 - 2024. All rights reserved.