title: ModuleNotFoundError: Failed to import modules from directory on distributed system
body: <p>I am working on a distributed system (yarn container), my IDE is Jupyterlab, in addition I have access to a bash terminal. I have several .py scripts in a distinct directory (with <strong>init</strong>.py), i try to import them as modules in my Notebook.</p>
  <p>So far I tried this in bash terminal:</p>
  <pre><code>RPATH=$(pwd)
  PPATH=$(pwd)'/src' # /src is the module folder
  echo $RPATH
  echo $PPATH
  export PYTHONPATH=$PPATH
  export ROOTPATH=$RPATH
  echo $PYTHONPATH
  echo $ROOTPATH
  conda env config vars set PYTHONPATH=$PPATH
  conda env config vars set ROOTPATH=$RPATH
  </code></pre>
  <p>And in the notebook itself i tried to set the environment variables by hand:</p>
  <pre><code>import os
  os.environ['PYTHONPATH']= '/data/yarn/local_dirs/usercache/{user}/appcache/{application_id}/{container_id}/tmp/{working directory}/src'
  os.environ['ROOT_DIR']= '/data/yarn/local_dirs/usercache/{user}/appcache/{application_id}/{container_id}/tmp/{working directory}'
  </code></pre>
  <p>This gives me repeatedly:</p>
  <pre><code>ModuleNotFoundError: No module named {modulename}
  </code></pre>
  <p>Any ideas are much appreciated!</p>