My project looks like this:
src
|--annotation_correction
|--|--suggestion.py
|--|--error.py
|--|--...
venv
|--...
I installed my package, using pip install -e .
while in the main folder.
When I type pip freeze
, my package "annotation" is in the list and VSCode also seems to recognize it as an installed package.
The problem is that when I run suggestion.py
while trying to import e.g. from error.py with from annotation_correction.error import Error, ErrorType
, I still get the error:
ModuleNotFoundError: No module named 'annotation_correction.error'; 'annotation_correction' is not a package
All this while using the interpreter that is running in the venv.
My setup.py
just calls setup()
and my setup.cfg
looks like this:
...
packages =
annotation_correction
...
package_dir =
=src