title: sys.path.insert cannnot import other python files
body: <p>What the title says. I have the following file structure inside the path<code>C:\Users\User\Desktop\all python file\5.0.8</code>:</p>
  
  <pre><code>5.0.8\
     tree one\
        little main.py
        sample_tree1.py
     tree two\
         sample_tree2.py
  </code></pre>
  
  <p>the following is what's inside <code>little main.py</code>:</p>
  
  <pre><code>import sys
  import sample_tree1
  
  sys.path.insert(0, r'C:\Users\User\Desktop\all python file\5.0.8\tree two\sample_tree2.py')
  
  import sample_tree2
  </code></pre>
  
  <p>I want to import <code>sample_tree2.py</code>, but an error is raised as soon as I run the <code>little main.py</code>:</p>
  
  <pre><code>Traceback (most recent call last):
  
    File "&lt;ipython-input-1-486a3fafa7f2&gt;", line 1, in &lt;module&gt;
      runfile('C:/Users/User/Desktop/all python file/5.0.8/tree one/little main.py', wdir='C:/Users/User/Desktop/all python file/5.0.8/tree one')
  
    File "C:\Users\User\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile
      execfile(filename, namespace)
  
    File "C:\Users\User\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
      exec(compile(f.read(), filename, 'exec'), namespace)
  
    File "C:/Users/User/Desktop/all python file/5.0.8/tree one/little main.py", line 12, in &lt;module&gt;
      import sample_tree2
  
  ModuleNotFoundError: No module named 'sample_tree2'
  </code></pre>
  
  <p>So what happened? I followed <a href="https://stackoverflow.com/questions/22955684/how-to-import-py-file-from-another-directory">this post's top answer</a> in order to import a file from another branch of path, but it doesn't work. </p>
  
  <p>Thank you in advance</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>I am looking for a solution that:</p>
  
  <p>1) does not require changing the current working directory</p>
  
  <p>2) does not require changing the names of the files</p>
  
  <p>3) does not require changing the configuration of the python terminal stuff</p>
  
  <hr>
  
  <p>EDIT2:
  Added some capscreens of files and folder structures, and error messages</p>
  
  <p><a href="https://i.stack.imgur.com/r6yHp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r6yHp.png" alt="path without sample_tree2.py"></a>
  <a href="https://i.stack.imgur.com/hObSB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hObSB.png" alt="path with sample_tree2.py"></a>
  <a href="https://i.stack.imgur.com/kUwWx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kUwWx.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/81tS2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/81tS2.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/xJ4rK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xJ4rK.png" alt="enter image description here"></a></p>