I'm building a library that will be included by other projects via pip.
I have the following directories ('venv' is a virtualenv):
project
\- bin
\- run.py
\- myproj
\- __init__.py
\- logger.py
\- venv
I activate the virtualenv.
In bin/run.py I have:
from myproj.logger import LOG
but I always get
ImportError: No module named myproj.logger
The following works from the 'project' dir:
python -c "from myproj.logger import LOG"
It's not correctly adding the 'project' directory to the pythonpath when called from the 'bin' directory. How can I import modules from 'myproj' from scripts in my bin directory?