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

Install error on Python 3.13 aarch64 due to Pendulum #517

Open
waghanza opened this issue Oct 20, 2024 · 6 comments
Open

Install error on Python 3.13 aarch64 due to Pendulum #517

waghanza opened this issue Oct 20, 2024 · 6 comments
Milestone

Comments

@waghanza
Copy link
Contributor

Hi @gi0baro ,

I have an error with python 3.13

2.990   × Preparing metadata (pyproject.toml) did not run successfully.
2.990   │ exit code: 1
2.990   ╰─> [13 lines of output]
2.990       error: failed to run `rustc` to learn about target-specific information
2.990
2.990       Caused by:
2.990         process didn't exit successfully: `/root/.rustup/toolchains/nightly-aarch64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names -C --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
2.990         --- stderr
2.990         error: unknown codegen option: `--crate-type`
2.990
2.990       💥 maturin failed
2.990         Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
2.990         Caused by: `cargo metadata` exited with an error:
2.990       Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-9kfw5xiz', '--interpreter', '/usr/local/bin/python3.13']' returned non-zero exit status 1.
2.990       Checking for Rust toolchain....
2.990       Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-9kfw5xiz --interpreter /usr/local/bin/python3.13`
2.990       [end of output]
2.990
2.990   note: This error originates from a subprocess, and is likely not a problem with pip.
3.193 error: metadata-generation-failed
3.193
3.193 × Encountered error while generating package metadata.
3.193 ╰─> See above for output.
3.193
3.193 note: This is an issue with the package mentioned above, not pip.
3.193 hint: See above for details.

I use the following dockerfile

 FROM python:3.13-slim

WORKDIR /usr/src/app

  ARG DEBIAN_FRONTEND=noninteractive
  RUN apt-get -y update

    RUN apt-get -y install libffi-dev
    RUN apt-get -y install libssl-dev
    RUN apt-get -y install curl


  COPY server.py server.py
  COPY pyproject.toml pyproject.toml

  RUN curl https://sh.rustup.rs > init.sh
  RUN sh init.sh -y
  RUN find $HOME/.cargo/bin -type f -exec install {} /usr/local/bin \;
  RUN rustup default nightly

  ENV RUSTFLAGS=-C target-feature=-crt-static

RUN pip install .

CMD emmett serve --host 0.0.0.0 --port 3000 --workers $(nproc)

The codebase is https://github.com/the-benchmarker/web-frameworks/blob/master/python/emmett/server.py

this is working fine with 3.12

any idea ?

Regards,

@gi0baro
Copy link
Member

gi0baro commented Oct 20, 2024

🤔 I don't get why is trying to compile anything whereas all the dependencies already have wheels for 3.13..
Which dependency is failing? Granian or emmett-core?

@waghanza
Copy link
Contributor Author

Probably due to the arch, I'm on mac m1 (arm based)

@gi0baro
Copy link
Member

gi0baro commented Oct 20, 2024

Arm64 wheels are published both for Macos and Linux though..

@waghanza
Copy link
Contributor Author

any idea on how to debug this ?

@gi0baro
Copy link
Member

gi0baro commented Oct 20, 2024

@waghanza tried locally, seems an issue with pendulum. I suggest to open up an issue in the relevant repository https://github.com/sdispater/pendulum

You can see it yourself trying to install emmett55 which has the same dependencies but pendulum.

@waghanza
Copy link
Contributor Author

Seems that pendulum does not support 3.13 yet, python-pendulum/pendulum#844

@gi0baro gi0baro changed the title Setup with granian and python3.13 Install error on Python 3.13 aarch64 due to Pendulum Oct 21, 2024
@gi0baro gi0baro added this to the 2.6 milestone Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants