Skip to content

Runtime imports SimpleITK and pyOpenSSL are missing from requirements.txt #1919

Open

Description

@garciadias

Problem

Two modules imported at runtime are not declared in requirements.txt, so CI jobs that import them fail:

  1. monailabel/datastore/utils/convert.py imports SimpleITK unconditionally, but SimpleITK is not in requirements.txt. The build job's unit-test collection fails with No module named 'SimpleITK', and the docs build (build-docs) fails for the same reason via autodoc.

  2. monailabel.deepedit.handlers (via torch -> tensorboard -> boto3 -> botocore -> urllib3) fails with:

    AttributeError: module 'lib' has no attribute 'GEN_EMAIL'
    

    This is a pyOpenSSL/cryptography version mismatch: mlflow pulls in cryptography>=43,<51 (currently 50.x), which is incompatible with the older system pyOpenSSL present on the runner. Declaring a compatible pyOpenSSL>=26 in requirements ensures a matching pyOpenSSL is installed.

Suggested fix

Add both to requirements.txt:

SimpleITK
pyOpenSSL>=26.0.0

Both are runtime dependencies of the package and belong in the runtime requirements, not just the dev requirements.

Activity

  1. garciadias commented on Oct 12, 2026

    @garciadias
    Author

    Follow-up: setup.cfg keeps its own install_requires list, separate from requirements.txt, and that is what the wheel uses. So the built wheel was also missing SimpleITK, and the server failed to start in the packaging job's integration tests. huggingface_hub is also needed at runtime: MONAI's default monaihosting bundle source downloads through it, and the pathology, endoscopy and monaibundle apps download bundles at startup. #1915 now adds SimpleITK, pyOpenSSL>=26.0.0 and huggingface_hub to both files. With that, ./runtests.sh --net passes when run from the built wheel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions