title: ModuleNotFoundError on console_scripts execution
body: <h3>What is happening</h3>
  
  <p>I have a simple CLI project written in Python 3 (Python 3.6.0 interpreter) which I can run using the package and module name directly from the command line, but which fails when installed with <code>setuptools</code>:</p>
  
  <pre class="lang-none prettyprint-override"><code># success
  ❯ python -m myProject.cli --version
  0.0.1.dev0
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code># failure
  ❯ mycli --version
  Traceback (most recent call last):
    File "/path/myProject/venv/bin/mycli", line 11, in &lt;module&gt;
      load_entry_point('myProject==0.0.1.dev0', 'console_scripts', 'mycli')()
    File "/path/myProject/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 560, in load_entry_point
      return get_distribution(dist).load_entry_point(group, name)
    File "/path/myProject/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2648, in load_entry_point
      return ep.load()
    File "/path/myProject/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2302, in load
      return self.resolve()
    File "/path/myProject/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2308, in resolve
      module = __import__(self.module_name, fromlist=['__name__'], level=0)
  ModuleNotFoundError: No module named 'myProject'
  </code></pre>
  
  <h3>Project setup</h3>
  
  <p>The project has the following structure:</p>
  
  <pre><code>.
  ├── myProject
  │   └── cli.py
  └── setup.py
  </code></pre>
  
  <p>I'm expecting the script to be installed as <code>mycli</code> later on, therefore my <code>setup.py</code> look like this:</p>
  
  <pre class="lang-py prettyprint-override"><code>from setuptools import setup, find_packages
  
  from myProject.cli import __version__
  
  setup(
  
      # Package info
      name = 'myProject',
      version = __version__,
      packages = find_packages(),
  
      # Dependencies
      install_requires = [
          'docopt&gt;=0.6.2'
      ],
  
      # Script info
      entry_points = {
          'console_scripts': [
              'mycli = myProject.cli:main'
          ]
      }
  )
  </code></pre>
  
  <h3>Installation</h3>
  
  <p>The installation completes without error:</p>
  
  <pre><code>❯ python setup.py install
  running install
  running bdist_egg
  running egg_info
  writing myProject.egg-info/PKG-INFO
  writing dependency_links to myProject.egg-info/dependency_links.txt
  writing entry points to myProject.egg-info/entry_points.txt
  writing requirements to myProject.egg-info/requires.txt
  writing top-level names to myProject.egg-info/top_level.txt
  reading manifest file 'myProject.egg-info/SOURCES.txt'
  writing manifest file 'myProject.egg-info/SOURCES.txt'
  installing library code to build/bdist.macosx-10.12-x86_64/egg
  running install_lib
  warning: install_lib: 'build/lib' does not exist -- no Python modules to install
  
  creating build/bdist.macosx-10.12-x86_64/egg
  creating build/bdist.macosx-10.12-x86_64/egg/EGG-INFO
  copying myProject.egg-info/PKG-INFO -&gt; build/bdist.macosx-10.12-x86_64/egg/EGG-INFO
  copying myProject.egg-info/SOURCES.txt -&gt; build/bdist.macosx-10.12-x86_64/egg/EGG-INFO
  copying myProject.egg-info/dependency_links.txt -&gt; build/bdist.macosx-10.12-x86_64/egg/EGG-INFO
  copying myProject.egg-info/entry_points.txt -&gt; build/bdist.macosx-10.12-x86_64/egg/EGG-INFO
  copying myProject.egg-info/requires.txt -&gt; build/bdist.macosx-10.12-x86_64/egg/EGG-INFO
  copying myProject.egg-info/top_level.txt -&gt; build/bdist.macosx-10.12-x86_64/egg/EGG-INFO
  zip_safe flag not set; analyzing archive contents...
  creating 'dist/myProject-0.0.1.dev0-py3.6.egg' and adding 'build/bdist.macosx-10.12-x86_64/egg' to it
  removing 'build/bdist.macosx-10.12-x86_64/egg' (and everything under it)
  Processing myProject-0.0.1.dev0-py3.6.egg
  Removing /path/myProject/venv/lib/python3.6/site-packages/myProject-0.0.1.dev0-py3.6.egg
  Copying myProject-0.0.1.dev0-py3.6.egg to /path/myProject/venv/lib/python3.6/site-packages
  myProject 0.0.1.dev0 is already the active version in easy-install.pth
  Installing mycli script to /path/myProject/venv/bin
  
  Installed /path/myProject/venv/lib/python3.6/site-packages/myProject-0.0.1.dev0-py3.6.egg
  Processing dependencies for myProject==0.0.1.dev0
  Searching for docopt==0.6.2
  Best match: docopt 0.6.2
  Adding docopt 0.6.2 to easy-install.pth file
  
  Using /path/myProject/venv/lib/python3.6/site-packages
  Finished processing dependencies for myProject==0.0.1.dev0
  </code></pre>
  
  <p><code>pip show</code> shows me the expected result as well:</p>
  
  <pre><code>❯ pip show myProject
  Name: myProject
  Version: 0.0.1.dev0
  Location: /path/myProject/venv/lib/python3.6/site-packages/myProject-0.0.1.dev0-py3.6.egg
  Requires: docopt
  </code></pre>
  
  <p>Nevertheless the <code>ModuleNotFoundError: No module named 'myProject'</code> error always pops up when I execute <code>mycli</code>.</p>
  
  <p>I'd be very grateful for any pointer.</p>