title: setup.py install vs pip install
body: <p>I want to create a python package which will be cloned from its git repo when a build runs, so I will have the source inside the build agent. I would then like to run the python package as a command line tool, the package is called <code>environment_manager</code>.</p>
  <p>Initially I thought I would follow a tutorial for creating a simple <code>setup.py</code> although this has proved to be a lot more difficult than I thought it would be and whenever I run <code>python setup.py install --force</code> I am not able to use my installed package, generally either module not found or the command is not recognised when I type it.</p>
  <p>I have found that if I simply install with <code>pip install .</code> then I am actually able to use the tool from the command line and it works. I don't understand what the difference is, or why this only works when doing the pip install method.</p>
  <p>Below is the <code>setup.py</code> file, I cannot see what is wrong with it:</p>
  <pre><code>from setuptools import setup, find_packages, find_namespace_packages
  import pathlib
  
  here = pathlib.Path(__file__).parent.resolve()
  
  # Get the long description from the README file
  long_description = (here / 'README.MD').read_text(encoding='utf-8')
  
  setup(
      name='environment_manager',
      version='1.0.0',
      package_dir={'': 'src'},
      packages=find_namespace_packages(where='src', include='environment_manager.*'),
      python_requires='&gt;=3.8, &lt;4',
      install_requires=['boto3', 'botocore', 'pyyaml'],
      extras_require={
          'dev': ['pre-commit', 'black', 'pylint'],
          'test': ['pytest', 'pytest-mock', 'coverage'],
      },
      entry_points={
          'console_scripts': [
              'environment-manager=environment_manager.environment_controller:main',
          ],
      }
  )
  </code></pre>
  <p>My project structure looks like:</p>
  <pre><code>environment_manager
     /src
        conf/
        environment_manager/
           environment_controller.py
           config_parser.py
           command.py
        test/
           unit_tests.py
  </code></pre>
  <p>I thought the correct way to install and run the tool from the command line was to use <code>setup.py</code> and <code>setuptools</code> but it seems like it is a lot easier and actually works if I just install it with pip.</p>
  <p>Is installing it with <code>pip</code> over <code>setup.py</code> correct (as both ways the package appears when I type <code>pip list</code>) and are there any issues with my <code>setup.py</code> script? The script was taken from the pypa sample project and I removed most of what I didnt need.</p>