I am trying to upload my package to pypi and use it. Using Twine i upload it to pypi but when i try to use this package I get Module not found error.
My Error :
My Folder structure for the package is :
The error points to the modelpg/__init__.py
, here's my modelpg/__init__.py
file.
Is it due to my package name is same as .py
file.
All of the imports in modelpg/__init__.py
would need to either be relative:
from .Transformer.transformer import Transformer
or absolute, with the modelpg
package name:
from modelpg.Transformer.transformer import Transformer
This has nothing to do with PyPI, by the way – the same applies even if the package wasn't installed from there.