title: sys.path.append not working in VSCode but same code works in Spyder?
body: <p>I am using Python in VS Code. I need to import modules from other directories, but VS Code is giving me <code>ModuleNotFoundError</code>. The same code works fine in Spyder, but I need to use VS Code. Does anyone know how to fix this problem? I have added the error and <code>launch.json</code> file. Thank you.</p>
  <p>Error that I am getting:</p>
  <blockquote>
  <p>/usr/bin/env /bin/python3 /home/johnkimm/.vscode-server/extensions/ms-python.python-2022.6.3/pythonFiles/lib/python/debugpy/launcher 53522 -- /mnt/c/Users/hojun/Desktop/QN-Python/Connection/Preparation_1_2_3_John.py
  Traceback (most recent call last):
  File &quot;/mnt/c/Users/hojun/Desktop/QN-Python/Connection/Preparation_1_2_3_John.py&quot;, line 19, in 
  from Preparation_before_EnteringQNMHP import PreparationBeforeEnteringQNMHP
  File &quot;/mnt/c/Users/hojun/Desktop/QN-Python/QNMHP_MATLAB/Preparation_before_EnteringQNMHP.py&quot;, line 12, in 
  from DrivingInit import DrivingInit
  ModuleNotFoundError: No module named 'DrivingInit'</p>
  </blockquote>
  <p><img src="https://i.stack.imgur.com/b55Th.png" alt="launch.json" /></p>