Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dask + pyinstaller fails

I am trying to use dask dataframes into a packaged executable using pyinstaller.

I have just

import dask

in my executable and I package it with

pyinstaller scripts.py

When I run it I get that /some/path/dask.yaml is not found.

Does somebody know if there are hidden imports that I should add or how else to solve this issue?

like image 896
luca pescatore Avatar asked Jul 16 '19 12:07

luca pescatore


1 Answers

For using dask with PyInstaller you need to add dask.yaml and distributed.yaml to your output executable with add-data flag:

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
like image 90
Masoud Rahimi Avatar answered Oct 31 '22 02:10

Masoud Rahimi