title: How to import the codes in __init__.py
body: <p>Assume I have the following file structure:</p>
  <pre><code>A/
     __init__.py
     B.py
  </code></pre>
  <p>Inside <code>__init.py__</code> I have the following:</p>
  <pre><code>__init__.py/
  import numpy as np
  import pandas as pd
  </code></pre>
  <p>Then inside the B.py I have the following:</p>
  <pre><code>B.py/
      from A import np
      print(np.linspace(0,10,10))
  </code></pre>
  <p>However, this code produces an <code>error that no module named A</code>. If for now, we do not consider the circular import problem which is not the case here. How can I import from</p>
  <pre><code>__init.py__
  </code></pre>
  <p>Since otherwise, all the imports I have in it will be useless. I recall a while ago I could run a code like above with no problem but now this is a problem.</p>
  <p>I can just add the path to package A to <code>sys.path</code> but then every time I should run the command and is not even scalable or practical.</p>
  <p>Does anyone why python is complaining and how I can import what I have in <strong>init</strong>.py?</p>