Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails with Python 3.13 #10

Open
cmahnke opened this issue Oct 20, 2024 · 2 comments
Open

Installation fails with Python 3.13 #10

cmahnke opened this issue Oct 20, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@cmahnke
Copy link

cmahnke commented Oct 20, 2024

Describe the bug
Installation error with Python 3.13 (On Apple Silicon M1):
Other questions don't apply.

  - Installing rpds-py (0.18.1): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel
  
  Running `maturin pep517 build-wheel -i /private/var/folders/k1/hdlmqrhx72vf59cyh6tkys9h0000gn/T/tmpfu7d17qv/.venv/bin/python --compatibility off`
      Updating crates.io index
   Downloading crates ...
    Downloaded heck v0.4.1
    Downloaded autocfg v1.1.0
    Downloaded bitflags v1.3.2
    Downloaded unindent v0.2.3
    Downloaded indoc v2.0.4
    Downloaded archery v1.2.0
    Downloaded pyo3-macros v0.20.3
    Downloaded windows-targets v0.48.1
    Downloaded memoffset v0.9.0
    Downloaded scopeguard v1.1.0
    Downloaded redox_syscall v0.3.5
    Downloaded static_assertions v1.1.0
    Downloaded triomphe v0.1.9
    Downloaded once_cell v1.18.0
    Downloaded parking_lot_core v0.9.8
    Downloaded smallvec v1.11.0
    Downloaded pyo3-build-config v0.20.3
    Downloaded lock_api v0.4.10
    Downloaded target-lexicon v0.12.9
    Downloaded quote v1.0.31
    Downloaded proc-macro2 v1.0.66
    Downloaded pyo3-macros-backend v0.20.3
    Downloaded unicode-ident v1.0.11
    Downloaded parking_lot v0.12.1
    Downloaded pyo3-ffi v0.20.3
    Downloaded rpds v1.1.0
    Downloaded portable-atomic v1.6.0
    Downloaded syn v2.0.32
    Downloaded windows_aarch64_gnullvm v0.48.0
    Downloaded windows_x86_64_gnullvm v0.48.0
    Downloaded pyo3 v0.20.3
    Downloaded windows_aarch64_msvc v0.48.0
    Downloaded windows_x86_64_msvc v0.48.0
    Downloaded windows_i686_gnu v0.48.0
    Downloaded windows_x86_64_gnu v0.48.0
    Downloaded windows_i686_msvc v0.48.0
    Downloaded libc v0.2.147
  📦 Including license file "/private/var/folders/k1/hdlmqrhx72vf59cyh6tkys9h0000gn/T/tmp608tvb19/rpds_py-0.18.1/LICENSE"
  🔗 Found pyo3 bindings
  🐍 Found CPython 3.13 at /private/var/folders/k1/hdlmqrhx72vf59cyh6tkys9h0000gn/T/tmpfu7d17qv/.venv/bin/python
  📡 Using build options features from pyproject.toml
  💻 Using `MACOSX_DEPLOYMENT_TARGET=11.0` for aarch64-apple-darwin by default
     Compiling target-lexicon v0.12.9
     Compiling once_cell v1.18.0
     Compiling autocfg v1.1.0
     Compiling proc-macro2 v1.0.66
     Compiling unicode-ident v1.0.11
     Compiling libc v0.2.147
     Compiling parking_lot_core v0.9.8
     Compiling portable-atomic v1.6.0
     Compiling cfg-if v1.0.0
     Compiling scopeguard v1.1.0
     Compiling smallvec v1.11.0
     Compiling heck v0.4.1
     Compiling static_assertions v1.1.0
     Compiling triomphe v0.1.9
     Compiling indoc v2.0.4
     Compiling unindent v0.2.3
     Compiling lock_api v0.4.10
     Compiling memoffset v0.9.0
     Compiling archery v1.2.0
     Compiling rpds v1.1.0
     Compiling parking_lot v0.12.1
     Compiling pyo3-build-config v0.20.3
     Compiling quote v1.0.31
     Compiling syn v2.0.32
     Compiling pyo3-ffi v0.20.3
     Compiling pyo3 v0.20.3
  error: failed to run custom build command for `pyo3-ffi v0.20.3`
  
  Caused by:
    process didn't exit successfully: `/private/var/folders/k1/hdlmqrhx72vf59cyh6tkys9h0000gn/T/tmp608tvb19/rpds_py-0.18.1/target/release/build/pyo3-ffi-1648e460d8d0dccd/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.20.3
    = 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="/private/var/folders/k1/hdlmqrhx72vf59cyh6tkys9h0000gn/T/tmpfu7d17qv/.venv/bin/python" PYTHON_SYS_EXECUTABLE="/private/var/folders/k1/hdlmqrhx72vf59cyh6tkys9h0000gn/T/tmpfu7d17qv/.venv/bin/python" "cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "/private/var/folders/k1/hdlmqrhx72vf59cyh6tkys9h0000gn/T/tmp608tvb19/rpds_py-0.18.1/Cargo.toml" "--release" "--lib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/rpds.cpython-313-darwin.so"`
  Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/private/var/folders/k1/hdlmqrhx72vf59cyh6tkys9h0000gn/T/tmpfu7d17qv/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
  

  at /opt/homebrew/Cellar/poetry/1.8.4/libexec/lib/python3.13/site-packages/poetry/installation/chef.py:164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with rpds-py (0.18.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "rpds-py (==0.18.1)"'.
@liebharc
Copy link
Owner

A fixed version seems to be available, so possibly this issue can be addressed by upgrading our poetry.lock -> adding the help wanted flag.

References:

@liebharc liebharc added the help wanted Extra attention is needed label Oct 21, 2024
@cmahnke
Copy link
Author

cmahnke commented Oct 23, 2024

Well, I don't think this should fixed directly (in this project):

  • PyO3 is a Rust dependency and thus not easily to be included by the version / lock management as a indirect Python dependency
  • In the case of homr it's introduced by rpds-py the version of PyO3 needs to be updated there, in fact it already is: Bump pyo3 from 0.22.3 to 0.22.5 crate-py/rpds#95
  • rpds-py either needs to be referenced by a published version (preferred) or by including the main branch itself

I would advice just to wait for the next rpds-py release and not messing around with the lock file or dependecies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants