title: Problems importing modules: ModuleNotFoundError
body: <p>I have a Python project with the following file structure:</p>
  
  <p>Under each Python file I have shown the lines of code that I am using to import:</p>
  
  <pre><code>.
  ├── README.md
  ├── requirements.txt
  └── warbot
      ├── bots
      │   ├── __init__.py
      │   ├── telegram_bot.py
      │   │     │ from warbot.lib.admin import WarBotAdmin
      │   │     │ from warbot.lib.vars import TELEGRAM_VARS, DATABASE_FILENAME
      │   └── twitter_bot.py
      │         │ from warbot.lib.twitter import WarBotTwitter
      │         │ from warbot.lib.vars import TWITTER_VARS, DATABASE_FILENAME
      ├── database
      │   └── warbot_db.json (TinyDB database)
      ├── __init__.py
      ├── lib
      │   ├── admin.py
      │   │     │ from .telegram import TelegramInterface
      │   │     │ from .database import WarBotDB
      │   │     │ from .warbot import WarBot
      │   │     │ from .vars import log
      │   ├── api.py
      │   │     │ from .database import WarBotDB
      │   ├── database.py
      │   │     │ from .vars import log
      │   ├── imagehandler.py
      │   ├── __init__.py
      │   ├── telegram.py
      │   ├── twitter.py
      │   │     │ from .warbot import WarBot
      │   │     │ from .api import WarBotAPI
      │   │     │ from .database import WarBotDB
      │   │     │ from .imagehandler import WarBotImageHandler
      │   ├── vars.py
      │   └── warbot.py
      │         │ from .database import WarBotDB
      ├── __main__.py
      ├── output (some logs)
      │   ├── logs_telegram.txt
      │   └── logs_twitter.txt
      ├── resources
      │   ├── (various resources)
      └── tmp
          └── info.txt
  </code></pre>
  
  <p>I am trying to compile the <code>telegram_bot.py</code> and <code>twitter_bot.py</code> files, but their compilation result in a <strong>ModuleNotFoundError</strong>: No module named <code>warbot</code>.</p>
  
  <p>Furthermore, when I try to compile, just to check the imports, the file <code>admin.py</code> (as an example), it throws me <strong>ModuleNotFoundError</strong>: No module named <code>'__main__.telegram'</code>; <code>'__main__'</code> is not a package.</p>
  
  <p>I have been documenting myself about Python imports, and even my IDE does not lint errors at this structure.</p>