title: Can't execute a script because module not found in Python
body: <p>I'm doing a lecture on Modules and Packages and I am trying to run a script that draws from code from another py file </p>
  
  <pre><code>     Traceback (most recent call last):
  
       File "D:/Python/Projects/myprogram.py", line 1, in &lt;module&gt;
  
       from mymodule import my_func
  
       ModuleNotFoundError: No module named 'mymodule'
  </code></pre>
  
  <p>I clearly have a mymodule.py and myprogram.py inside my projects folder (D:\Python\Projects) </p>
  
  <p>mymodule.py has</p>
  
  <pre><code>    def my_func():
         print("Hey I am in my mymodule.py")
  </code></pre>
  
  <p>myprogram.py has</p>
  
  <pre><code> from mymodule.py import my_func
  
   my_func()
  </code></pre>
  
  <p>Can I get some help regarding this?</p>