Skip to content

c2pa-python 0.12.0 version running error for macOS x86_64 #138

Description

@ttbuffey

when I upgraded c2pa-python from 0.6.0 to 0.12.0, it show the below error. It seems lacking some lib files for macOS x86_64, it only support macOSARM

2025-08-15` 13:48:27,306 - ERROR - Platform: universal-apple-darwin, Architecture: **x86_64**
Traceback (most recent call last):
    from c2pa import Builder, C2paSigningAlg as SigningAlg, sign_ps256
  File "/lib/python3.11/site-packages/c2pa/__init__.py", line 7, in <module>
    from .c2pa import (
  File "/lib/python3.11/site-packages/c2pa/c2pa.py", line 103, in <module>
    _lib = dynamically_load_library(_lib_name_default)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/lib/python3.11/site-packages/c2pa/lib.py", line 254, in dynamically_load_library
    raise RuntimeError(f"Could not find {lib_name} in any of the search paths (Platform: {platform_id}, Architecture: {current_arch})")
RuntimeError: Could not find libc2pa_c.dylib in any of the search paths (Platform: universal-apple-darwin, Architecture: x86_64)

when I use verison 0.6.0, it worked before.

Activity

  1. tmathern commented on Aug 18, 2025

    @tmathern
    Collaborator

    macOS x86_64 is currently unsupported for the latest versions if you install from wheels.

  2. tmathern commented on Aug 18, 2025

    @tmathern
    Collaborator

    c2pa-python uses native libraries, that we need to build for each platform. Due to this, we now have stronger limitations regarding supported platforms. Especially for macOS x86_64, as I believe Apple is sunsetting the Intel-based machines.

    A workaround for this is installing from git directly, not using the wheels. I see that we have the needed native libraries available for download, but not the x86_64 wheel build.

  3. tmathern commented on Aug 20, 2025

    @tmathern
    Collaborator

    I will look into updating code and builds to provide an universal mac wheel, which should fix the issue (but it will take a minute). I'll post a PR/WIP PR here too once I start having something.

  4. self-assigned this
    on Aug 20, 2025
  5. ttbuffey commented on Aug 22, 2025

    @ttbuffey
    Author

    Thanks, I look forward to your update. It makes me really hard to develop in local environment, Thanks.

  6. ttbuffey commented on Aug 22, 2025

    @ttbuffey
    Author

    @tmathern for the workaround, do you mean
    pip install git+https://github.com/contentauth/c2pa-python.git?

    after I installed this , I still get the same error, what is the missing step?
    raise RuntimeError(f"Could not find {lib_name} in any of the search paths (Platform: {platform_id}, Architecture: {current_arch})") RuntimeError: Could not find libc2pa_c.dylib in any of the search paths (Platform: universal-apple-darwin, Architecture: x86_64)

  7. tmathern commented on Aug 23, 2025

    @tmathern
    Collaborator

    You'd need changes from #142 for the install to work out of the box.
    A more hacky way is to rename files and folders so it finds the native library, since I already use the mac universal one (but I'd recommend trying out the isntall from #142 | branch mathern/switch-to-universal-mac-build first).

  8. ttbuffey commented on Aug 25, 2025

    @ttbuffey
    Author

    Hi @tmathern , I tried install the specific branch:
    pip install git+https://github.com/contentauth/c2pa-python.git@mathern/switch-to-universal-mac-build

    the same issue occurs, I still didn't see the libc2pa_c.dylib file in the installed site-packages. please check the below screenshot. Is my process correct? the python version is Python 3.11.1

    Image
  9. tmathern commented on Aug 25, 2025

    @tmathern
    Collaborator

    Right, I missed to add the download of the native libs when installing from git. I think you'll have to wait a little bit for the new version of the wheel supporting mac universal then. (Or for me finding time to fix that download when installing from git).

  10. ttbuffey commented on Aug 26, 2025

    @ttbuffey
    Author

    it doesn't matter, i can wait till the new release then. Thanks very much for the dedicated focus.

  11. tmathern commented on Aug 27, 2025

    @tmathern
    Collaborator

    I've been working on #148. I ran a test publish to PyPI test (from that PR), a v0.14.0-alpha: https://test.pypi.org/project/c2pa-python/0.14.0a0/ that should have all wheels for mac (arm, Intel, universal). Do you want to give it a try @ttbuffey ?

  12. tmathern commented on Aug 28, 2025

    @tmathern
    Collaborator

    #146 makes the published wheels mac universal until I get the arch builds. There will shortly be a v0.15.0 publish to PyPI accordingly.

  13. tmathern commented on Aug 28, 2025

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions