Skip to content

Python module "_extra" could not be loaded #4525

Open
@workflowsguy

Description

@workflowsguy

Description of the bug

After updating pymupdf from 1.25.5 to 1.26, importing the module now fails with the following exception

Traceback (most recent call last):
  File "/Users/guy/bin/detect sender.py", line 84, in <module>
    import fitz as PyMuPDF
  File "/Users/guy/Library/Python/3.12/lib/python/site-packages/fitz/__init__.py", line 2, in <module>
    from pymupdf import *
  File "/Users/guy/Library/Python/3.12/lib/python/site-packages/pymupdf/__init__.py", line 30, in <module>
    from . import extra
  File "/Users/guy/Library/Python/3.12/lib/python/site-packages/pymupdf/extra.py", line 10, in <module>
    from . import _extra
ImportError: dlopen(/Users/guy/Library/Python/3.12/lib/python/site-packages/pymupdf/_extra.so, 2): Symbol not found: __ZNKSt3__14__fs10filesystem28recursive_directory_iterator13__dereferenceEv
  Referenced from: /Users/guy/Library/Python/3.12/lib/python/site-packages/pymupdf/libmupdf.dylib
  Expected in: /usr/lib/libc++.1.dylib
 in /Users/guy/Library/Python/3.12/lib/python/site-packages/pymupdf/libmupdf.dylib

Reverting pymupdf back to 1.25.5, my script works again.

How to reproduce the bug

import fitz as PyMuPDF

PyMuPDF version

1.26.0

Operating system

macOS

Python version

3.12.10

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