Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Installation fails due to PyO3 dependency - incompatible with Python 3.13Β #16

@mfasold

Description

@mfasold

I just did a fresh installation of llm via brew on a M1 Mac, followed by llm install llm-claude-3.

Here, I get the following error

Building wheels for collected packages: tokenizers
  Building wheel for tokenizers (pyproject.toml) ... error
...
      error: failed to run custom build command for `pyo3-ffi v0.21.2`

      Caused by:
        process didn't exit successfully: `/private/var/folders/sk/kx1k0x6522j0g4y_5h137d4w0000gn/T/pip-install-ev5faqat/tokenizers_22eea7ad05ff47b9b1d00ab3bf8670bb/bindings/python/target/release/build/pyo3-ffi-6e049bc9fd234003/build-script-build` (exit status: 1)
        --- stdout
        cargo:rerun-if-env-changed=PYO3_CROSS
        cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR
        cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION
        cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION
        cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG
        cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY

        --- stderr
        error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
        = help: please check if an updated version of PyO3 is available. Current version: 0.21.2
        = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
      warning: build failed, waiting for other jobs to finish...
      πŸ’₯ maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `env -u CARGO MACOSX_DEPLOYMENT_TARGET="11.0" PYO3_ENVIRONMENT_SIGNATURE="cpython-3.13-64bit" PYO3_PYTHON="/opt/homebrew/Cellar/llm/0.16/libexec/bin/python" PYTHON_SYS_EXECUTABLE="/opt/homebrew/Cellar/llm/0.16/libexec/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/private/var/folders/sk/kx1k0x6522j0g4y_5h137d4w0000gn/T/pip-install-ev5faqat/tokenizers_22eea7ad05ff47b9b1d00ab3bf8670bb/bindings/python/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/tokenizers.tokenizers.cpython-313-darwin.so"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/opt/homebrew/Cellar/llm/0.16/libexec/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]

Any ideas on that? Was there maybe a recent update to [email protected]? The suggested workaround PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 also did not work out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions