title: ModuleNotFoundError: No module named <modulename> after installing custom package with pip
body: <p>Before asking this question, I have seen the following questions that are somehow similar to my question, but they didn't resolve the existing error:</p>
  <ul>
  <li><a href="https://stackoverflow.com/questions/59305504/modulenotfounderror-no-module-named-modulename-after-pip-install">ModuleNotFoundError: No module named  after pip install
  </a></li>
  <li><a href="https://stackoverflow.com/questions/49295992/importerror-no-module-after-python-setup-py-install">ImportError: No module… After python setup.py install</a></li>
  </ul>
  <p>I have the following structure:</p>
  <pre class="lang-sh prettyprint-override"><code>backbone-project
  ├── backbone
  │   ├── backbone.py
  │   ├── cmd_parser.py
  │   ├── command_executor.py
  │   ├── config_files
  │   ├── db_connections
  │   ├── extras
  │   ├── __init__.py
  │   ├── __pycache__
  │   ├── query_files
  │   ├── templates
  │   ├── tests
  │   └── utils
  ├── LICENSE
  ├── README.md
  ├── requirements.txt
  ├── setup.py
  </code></pre>
  <p>and this is my <em>setup.py</em> file:</p>
  <pre class="lang-py prettyprint-override"><code>import setuptools
  from backbone.utils.enums import Files, Letters
  
  
  with open(Files.README.value, Letters.R.value, encoding=Letters.UTF_8.value) as readme_file:
      long_description = readme_file.read()
  
  with open(Files.REQUIREMENTS.value, Letters.R.value, encoding=Letters.UTF_8.value) as requirements_file:
      requirements = requirements_file.read().splitlines()
  
  setuptools.setup(
      name=&quot;backbone&quot;,
      version=&quot;1&quot;,
      entry_points={
        &quot;console_scripts&quot;: [
            'backbone=backbone.backbone:main'
        ]
      },
      author=&quot;Mostafa Ghadimi&quot;,
      author_email=&quot;my email&quot;,
      long_description=long_description,
      install_requirements=requirements,
      # install_requires=requirements,
      long_description_content_type=&quot;text/markdown&quot;,
      url=&quot;url&quot;,
      classifiers=[
          &quot;Programming Language :: Python :: 3&quot;,
          &quot;License :: OSI Approved :: MIT License&quot;,
          &quot;Operating System :: OS Independent&quot;,
      ],
      package_dir={&quot;&quot;: &quot;backbone&quot;},
      packages=setuptools.find_packages(&quot;backbone&quot;),
      python_requires=&quot;&gt;=3.6&quot;,
      license='MIT',
  )
  </code></pre>
  <p><strong>backbone/backbone.py</strong></p>
  <pre><code>#!/usr/bin/env python
  from cmd_parser import parse_args
  from utils.logger import Logger
  from utils.enums import Messages
  
  
  def main():
      logger = Logger(__name__)
      logger.log(Messages.BACKBONE_WELCOME_MSG.value)
      parse_args()
  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  <p>The problem is that whenever I want to install the package, it is installed successfully, but as the command is being executed, the error is raised:</p>
  <p>requirements.txt</p>
  <pre><code>git+https://&lt;username&gt;:&lt;password&gt;@&lt;git_repository_url&gt;.git
  </code></pre>
  <p>and install it using the following command:</p>
  <pre><code>pip install -r requirements
  </code></pre>
  <p>(It has been installed without any error.)</p>
  <p>As I want to use the package (in bash), I face to following error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/home/user/.local/bin/backbone&quot;, line 5, in &lt;module&gt;
      from backbone import main
  ImportError: cannot import name 'main' from 'backbone' (unknown location)
  </code></pre>
  <p>How can I resolve this error?</p>
  <p><strong>P.S. 1</strong> On local after exporting <code>PYTHONPATH</code> the problem is resolved, but the problem still exists when I want to install the package from git repository!</p>
  <p><strong>P.S. 2</strong> I am somehow sure that the problem is with <code>entry_points</code>. I have also tried <code>backbone:main</code> but it doesn't work!</p>