title: How to add my own module to dask worker env to avoid no module named
body: <p>I use dask clusters to process dataset. My dask python project structure is as follows:</p>
  <pre><code>project_name/
    folder_a
      a.py
    folder_b
      b.py
  </code></pre>
  <p>I import function <code>function_a()</code> within <code>a.py</code> in <code>b.py</code> like follows:</p>
  <pre><code>from folder_a.a import function_a
  
  @delayed
  def test(input_str):
    return function_a(input_str)
  
  client = ...
  
  d_task = [test(str)]
  dask.compute(d_task)
  </code></pre>
  <p>However, dask worker nodes throw exception <code>ModuleNotFoundError: No module named 'folder_a'</code></p>
  <p>I have tried many solutions like add <code>PYTHONPATH={dir}/project_name</code> while none of them are available.</p>
  <p>How to solve this problem? Is there any way that can add <code>{dir}/project_name</code> to dask worker environment?</p>