python - Dask + pyinstaller 失败

标签 python runtime-error pyinstaller dask

我正在尝试使用 pyinstaller 将 dask 数据帧用于打包的可执行文件。

我刚刚

导入数据

在我的可执行文件中,我用

打包它

pyinstaller scripts.py

当我运行它时,我发现找不到 /some/path/dask.yaml

有人知道我是否应该添加隐藏的导入或者如何解决这个问题吗?

最佳答案

要在 PyInstaller 中使用 dask,您需要使用 add-datadask.yamldistributed.yaml 添加到您的输出可执行文件中标志:

pyinstaller -F --add-data "<python_path>/Lib/site-packages/dask/dask.yaml;./dask" --add-data "<python_path>/Lib/site-packages/distributed/distributed.yaml;./distributed" script.py

关于python - Dask + pyinstaller 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57057336/

相关文章:

python - 在 Python 中将文本与嵌套的 OrderedDict 分开

cuda - CUDA上的“incorrect inclusion of a cudart header”错误

php - 错误多个指令 [bar, bar] 在使用自定义指令和 angular-bootstrap 时询问模板

python - LSTM for 30 classes,严重过拟合,无法超过 76% 的测试准确率

Python C 扩展向异常添加属性

c++ - 奇怪的 QT Unsigned Int 错误

python - 我如何通过我的规范文件说服 PyInstaller 在它生成的 EXE 中包含 libvlc.dll?

python - .py 仅转换为一个 .exe 文件

pyside - Pyinstaller:ImportError:无法导入名称 QtGui

python - 尝试在 2.7 版上安装 Ipython 但它一直尝试在 2.5 版上安装