title: ImportError : Attempted relative import with no known parent package
body: <p>I am learning to program with python and I am having issues with importing from a module in a package. I am usingvisual studio code with Python 3.8.2 64 bit.</p>
  <p><a href="https://i.stack.imgur.com/ZQZhP.png" rel="noreferrer">My Project Directory</a></p>
  <pre><code>.vscode
  ├── ecommerce
  │   ├── __init__.py
  │   ├── database.py
  │   ├── products.py
  │   └── payments
  │       ├── __init__.py
  │       ├── authorizenet.py
  │       └── paypal.py
  ├── __init__.py
  └── main.py
  </code></pre>
  <p>in the <code>ecommerce/products.py</code> file I have:</p>
  <pre class="lang-py prettyprint-override"><code>#products.py
  from .database import Database
  p = Database(3,2)
  </code></pre>
  <p>So that I can import the <code>Database</code> class from the <code>ecommerce/database.py</code> file. But I get error</p>
  <pre><code>ImportError : Attempted relative import with no known parent package
  </code></pre>