title: Download own module with pip, "No module named ..."
body: <p>I am in the process of building my own Python module, just to get a hang of how it works. My Python is decent, but I have never build or submitted any packages before. </p>
  
  <p>I followed a guide on <a href="https://pythonhosted.org/an_example_pypi_project/setuptools.html" rel="nofollow noreferrer">Python Hosted</a> as well as <a href="http://setuptools.readthedocs.io/en/latest/setuptools.html" rel="nofollow noreferrer">the official <code>setuptools</code> documentation</a> and this article on <a href="https://packaging.python.org/tutorials/distributing-packages/#setup-args" rel="nofollow noreferrer">python.org</a>. However, I still can't get this to work.</p>
  
  <p>The package structure, with three modules (FileHelpers, TypeHelpers, XmlHelpers), looks like this:</p>
  
  <pre><code>PyLT3/
  |- .git/
  |- .idea/
  |- setup.py
  |- __init__.py
  |- README.rst
  |- LICENSE.txt
  |- .gitignore
  |- FileHelpers.py
  |- TypeHelpers.py
  |- XmlHelpers.py
  </code></pre>
  
  <p>Contents of <code>setup.py</code>:</p>
  
  <pre><code>from setuptools import setup, find_packages
  
  setup(
      name='PyLT3',
      version='0.1.3',
      description='A collection of helper functions and NLP scripts',
      long_description='During my time working on the PhD project PreDict, I have written and gathered a bunch of useful functions. They are collected here as part of the PyLT3 package.',
      keywords='nlp xml file-handling helpers',
      packages=find_packages(),
      url='https://github.com/BramVanroy/PyLT3',
      author='Bram Vanroy',
      author_email='bramvanroy@hotmail.com',
      license='MIT',
      classifiers=[
          'Development Status :: 1 - Planning',
          'Intended Audience :: Developers',
          'Intended Audience :: Science/Research',
          'Topic :: Scientific/Engineering',
          'Topic :: Text Processing',
          'License :: OSI Approved :: MIT License',
          'Programming Language :: Python :: 3.6',
      ],
      project_urls = {
          'Bug Reports': 'https://github.com/BramVanroy/PyLT3/issues',
          'Source': 'https://github.com/BramVanroy/PyLT3',
      },
      python_requires='&gt;=3.6',
  )
  </code></pre>
  
  <p>Contents of MANIFEST.in: </p>
  
  <pre><code>prune .idea/*
  </code></pre>
  
  <p>With this data, I create a distribution:</p>
  
  <pre><code>python setup.py sdist
  </code></pre>
  
  <p>And a wheel:</p>
  
  <pre><code>python setup.py bdist_wheel
  </code></pre>
  
  <p>And the distribution is then uploaded to PyPi:</p>
  
  <pre><code>twine upload dist/*
  </code></pre>
  
  <p>To test this out, I download <a href="https://pypi.org/project/PyLT3/" rel="nofollow noreferrer">the package</a> with pip:</p>
  
  <pre><code>pip install PyLT3
  </code></pre>
  
  <p>(Also used <code>pip3</code>.) It successfully installs.</p>
  
  <p>But when I then try a simple <code>import PyLT3</code>, I get an error </p>
  
  <blockquote>
  <pre><code>import PyLT3 
  </code></pre>
    
    <p>ModuleNotFoundError: No module named 'PyLT3'</p>
  </blockquote>
  
  <p>This is odd, because pip told me the module was successfully installed. So I went looking for the module, and its <code>*.info</code> is installed in <code>C:\Python\Python36\Lib\site-packages\PyLT3-0.1.3.dist-info</code>. But I am assuming that this is not the actual package but just an info directory. There is no other package (e.g. <code>PyLT3/</code>).</p>
  
  <p>All of this leads me to believe that I did something wrong when <em>packaging</em>. What did I forget?</p>