I run my python project both locally in my development environment and from an installed package.
in my main.py I want to get the version from init.py:
from . import version
but I get the error:
ValueError: attempted relative import in non-package
my directory structure is as follows:
./proj1/main.py
./proj1/__init__.py
I'm running it via
cd proj1 && ./main.py
I use the version for setup.py and within my main.py to output the version.