title: Issue importing modules with Django, but runs fine when I run it independently using '-m' flag
body: <p>Currently I have a python project with the following directory structure.</p>
  <p><a href="https://i.stack.imgur.com/yCrXM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yCrXM.png" alt="enter image description here" /></a></p>
  <p>I can run the <code>demo.py</code> file directly fine (without importing it in my Django project) from the outermost directory shown above using the following command:</p>
  <p><code>python -m  ObjectSegmentation.segmentation_api.apps.tools.demo</code></p>
  <p>However, in my Django project, I need to import the <code>demo.py</code> file in my django <code>views.py</code> file, but when I do so, I get the following error:</p>
  <pre><code>    from ObjectSegmentation.segmentation_api.apps.tools.test import *
  ModuleNotFoundError: No module named 'ObjectSegmentation'
  </code></pre>
  <p>These are the first few lines from <code>demo.py</code> (including line 4) where the error occurs.</p>
  <p><a href="https://i.stack.imgur.com/ltyzm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ltyzm.png" alt="enter image description here" /></a></p>
  <p>My installed apps in <code>settings.py</code> for the whole project look like this:</p>
  <pre><code>INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'apps.tools.demo',
      'rest_framework'
  ]
  </code></pre>
  <p>How can I make it so that the imports work with both the project run independently and imported in my django project?</p>