You have build it as a package.
Then is your folder named
Eg
Then is your folder named
src
also part of import.(my_env) E:\1\my_env λ pip install catslog Collecting catslog Downloading catslog-1.0.5.tar.gz Installing collected packages: catslog Running setup.py install for catslog ... done Successfully installed catslog-1.0.5 >>> import src >>> src.catslog <module 'src.catslog' from 'E:\\1\\my_env\\lib\\site-packages\\src\\catslog.py'> >>> help(src.catslog) Help on module src.catslog in src: NAME src.catslog FUNCTIONS catslog(f) FILE e:\1\my_env\lib\site-packages\src\catslog.pyIf it's a singe module can use
py_modules=['catslog']
in setup.py,and just drop package.Eg
# setup.py from setuptools import setup __author__ = 'you' setup( name="catslog", version='0.1', py_modules=['catslog'], description="Something", url='', author_email='something@', )You should always build wheel and not source distributions(
sdist
).python setup.py bdist_wheel