Friday, 4 October 2019

Custom python package not found

I followed this tutorial from python.org and managed to upload to PyPI and install with pip but all I get is

ModuleNotFoundError: No module named 'tomaszslittlehelpers'

Any suggestions?

The import works locally that is when imported from a file in a folder above.

package name is tomaszslittlehelpers

setup.py:

import setuptools

with open('README.md', 'r') as fh:
    long_description = fh.read()

setuptools.setup(
        name='tomaszslittlehelpers',
        version='0.0.2',
        author='TomaszAndrzej',
        author_email='',
        description='Tomasz\'s Little Helpers',
        long_description=long_description,
        long_description_content_type='text/markdown',
        url='',
        packages=setuptools.find_packages(),
        classifiers=[
                'Programming Language :: Python :: 3',
                'License :: OSI Approved :: MIT License',
                'Operating System :: OS Independent',
                ],
        python_requires='>=3.7',

        )

__init__.py:

name='tomaszslittlehelpers'

Project tree:

tomaszslittlehelpers
    build
        bdist.win-amd64
    dist
        tomaszslittlehelpers-0.0.2-py3-none-any.whl
        tomaszslittlehelpers-0.0.2.tar.gz
    tomaszslittlehelpers.egg-info
        dependency_links.txt
        PKG-INFO
        SOURCES.txt
        top_level.txt
    __init__.py
    LICENSE
    README.md
    setup.py

pip install tomaszslittlehelpers
installs into

C:\users ... \python37\Lib\site-packages\tomaszslittlehelpers-0.0.1.dist-info there is no tomaszslittlehelpers folder



from Custom python package not found

No comments:

Post a Comment