title: Set cwd in VS CODE
body: <p>VS CODE 1.52.1
  Python 3.7.9</p>
  <p>Path structure</p>
  <ul>
  <li>MyWorkspace
  <ul>
  <li>Folder Main
  <ul>
  <li>MyWorkspace.code-workspace</li>
  <li>MainModule.py</li>
  </ul>
  </li>
  <li>Folder A
  <ul>
  <li>SubModule_A.py</li>
  </ul>
  </li>
  <li>Folder B
  <ul>
  <li>SubModule_B.py</li>
  </ul>
  </li>
  </ul>
  </li>
  </ul>
  <hr />
  <p>In the past, I could import &quot;MainModule.py&quot; in all of sub-modules in any directory easily like below.</p>
  <pre><code>import MainModule
  </code></pre>
  <p>But after I reinstall VS Code, they are unable to find modules in different paths. I've found some solutions importing modules with absolute paths, but there are hundreds sub-modules already making hard to modify them all.</p>
  <p>I tried below but nothing works.</p>
  <ol>
  <li>Modifying cwd</li>
  </ol>
  <p>In &quot;SubModule_a.py&quot;,</p>
  <pre><code>import os
  os.chdir(&quot;C:\\work\\Folder Main&quot;)
  import MainModule
  </code></pre>
  <p>This still arises ModuleNotFoundError</p>
  <ol start="2">
  <li><p>Modifying &quot;MyWorkspace.code-workspace&quot;</p>
  <p>&quot;settings&quot;: {</p>
  <pre><code> &quot;python.pythonPath&quot;: &quot;C:\\anaconda3\\envs\\MyEnv\\python.exe&quot;, # for virtual env
   &quot;python.linting.pylintEnabled&quot;: true,
   &quot;python.linting.enabled&quot;: true,
   &quot;terminal.integrated.cwd&quot;: &quot;C:\\work\\Folder Main&quot; # added this line
  </code></pre>
  <p>}</p>
  </li>
  </ol>
  <p>In short, how can I import &quot;MainModule.py&quot; from &quot;SubModule_A.py&quot; without using absolute path?</p>