I have a poetry package that looks so:
recon/
- pyproject.toml
- recon/
- main.py
- config.py
From my main.py
, I’m not able to do from recon.config import *
– it says "ModuleNotFoundError: No module named 'recon.config'; 'recon' is not a package"
.
I tried adding:
packages = [
{ include = "recon" }
]
And running poetry -C recon/ install
– no change.
For context, recon
is part of my other project, so in reality the structure looks like this:
mainproject/
- recon/
- recon/
- main.py
And I run main.py
like this: poetry -C recon run python main.py
. I’ve also tried to activate the virtualenv
and run the file, still no luck.
3