pyinstaller 在编译时出现奇怪的错误 pandas

pyinstaller gives weird errors when compiling pandas

6 月 18 日更新:

我想为 windows 编译我的 python 代码。 我曾经使用 pyinstaller、python 3.5+、windows 7 和 anaconda 来控制模块 pandas、pyqt (v5) 和 pyqtgraph,但似乎有些不兼容。如果您告诉我更改版本,我不会感到惊讶。

在以前的版本中,它适用于 python 3.5、windows 7 和 Pyinstaller 3.3.1- 没有 pandas;新版本导入 pandas 然后这不再有效:

我会对任何版本的任何解决方案感到高兴 windows-编译我的代码

我不知道这是否是问题所在,但我没有在 Supported-Packages

中找到 PyQtGraph

我最终在原始配置中应用了No module named 'pandas._libs.tslibs.timedeltas' in PyInstaller中提出的第一个解决方案(python 3.5,PyInstaller 3.3.1,pyqtgraph,pandas,windows 7, ...) 并且有效。

我不知道为什么添加 def get_pandas_path ..... a.binaries) 有帮助,所以我无法证明。但即使看起来很明显也要明确:pyinstaller 必须在 spec 文件上 运行,而不是在 py 文件上(例如 > pyinstaller toto.spec