title: ModuleNot FoundError : No module named 'lib'
body: <p>I am trying to understand import mechanism behind python but this piece of code gives error.</p>
  
  <p>Here is my folder structure:</p>
  
  <pre><code>import_test
    -calculator
     ..__init__.py
     ..operation.py
    -lib
     ..__init__.py
     ..multiply.py
  </code></pre>
  
  <p>It is working when i ran on PyCharm IDE, but if i run from command line like</p>
  
  <pre><code>'py operation.py'(for now windows,for the next phase i will try on raspbian RPi)
  </code></pre>
  
  <p><strong>i am getting module not found error! Tried many ways from forums on internet but still no progress.</strong> </p>
  
  <p>multiply.py:</p>
  
  <pre><code>def multiplier(a,b):
      return a + b
  </code></pre>
  
  <p>operation.py:</p>
  
  <pre><code>from lib.multiply import multiplier
  print (multiplier(3,4))
  </code></pre>
  
  <p>lib/<strong>init</strong>.py:</p>
  
  <pre><code>from .multiply import multiplier
  </code></pre>
  
  <p>This is the output of my running:</p>
  
  <pre><code>File "operation.py", line 1, in &lt;module&gt;
      from lib.multiply import multiplier
  ModuleNotFoundError: No module named 'lib'
  </code></pre>