Skip to content

ImportError for skimage.transform.resize when using PYTHONOPTIMIZE=2 on python3.13 #8089

Open

Description

@ancestor-mithril

Description:

Importing resize from skimage.transform fails when using PYTHONOPTIMIZE=2 on python3.13.
It works with PYTHONOPTIMIZE=1. And it's a recent issue, the import works with scikit-image-0.25.0.

Way to reproduce:

PYTHONOPTIMIZE=2 python -c "from skimage.transform import resize"

Output:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    from skimage.transform import resize
ImportError: cannot import name 'resize' from 'skimage.transform' (/opt/conda/lib/python3.13/site-packages/skimage/transform/__init__.py)

Version information:

3.13.12 | packaged by conda-forge | (main, Feb  5 2026, 05:53:46) [GCC 14.3.0]
Linux-6.18.7-76061807-generic-x86_64-with-glibc2.39
scikit-image version: 0.26.0
numpy version: 2.4.2

Activity

  1. stefanv commented on Mar 13, 2026

    @stefanv
    Member

    I can confirm this bug, but I am quite surprised since we have in our CI:

              - platform_id: manylinux_x86_64
                python-version: "3.12"
                PYTHONOPTIMIZE: 2
                WITHOUT_POOCH: 1
                OPTIONS_NAME: "optimize and no pooch"
    
  2. stefanv commented on Mar 13, 2026

    @stefanv
    Member

    Looks like it slipped out of CI; added it back here #8092

  3. stefanv commented on Mar 13, 2026

    @stefanv
    Member

    That PR should also fix the problem.

  4. github-actions commented on Sep 10, 2026

    @github-actions

    Hello scikit-image core devs! There hasn't been any activity on this issue for more than 180 days. I have marked it as "dormant" to make it easy to find.

    To our contributors, thank you for your contribution and apologies if this issue fell through the cracks! Hopefully this ping will help bring some fresh attention to the issue. If you need help, you can always reach out on our forum

    If you think that this issue is no longer relevant, you may close it, or we may do it at some point (either way, it will be done manually).

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

    🐛 Bug😴 Dormant

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions