Skip to content

Imports using src.kidney_abnormality_segmentation... fail #1

@paul0202

Description

@paul0202

Hi, thanks for open-sourcing this project.

I encountered an issue after cloning the repository and installing it in editable mode as described in the README:

git clone https://github.com/DIAGNijmegen/oncology-kidney-abnormality-segmentation.git
cd oncology-kidney-abnormality-segmentation
pip install -e .

Environment:

  • OS: Microsoft Windows 11 Home

  • Python: 3.12.10

After installation, src/ is added to sys.path and therefore acts as the Python import root. I confirmed this with:

python -c "import sys; print('\n'.join(sys.path))"

which includes:

...\oncology-kidney-abnormality-segmentation\src

Because of this, kidney_abnormality_segmentation is exposed as the top-level package.

However, some files in the repository import modules using:

from src.kidney_abnormality_segmentation.utils import crop_image, resample_volume

which raises:

Cannot find module `src.kidney_abnormality_segmentation.utils`

Imports without src. work correctly, e.g.:

from kidney_abnormality_segmentation.utils import crop_image, resample_volume

The issue appears consistently for every module imported through src.kidney_abnormality_segmentation....

Thanks again for sharing the repository and model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions