Install error on Python 3.13 aarch64 due to Pendulum
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,
🤔 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?
Probably due to the arch, I'm on mac m1 (arm based)
Arm64 wheels are published both for Macos and Linux though..
any idea on how to debug this ?
@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.
Seems that pendulum does not support 3.13 yet, https://github.com/sdispater/pendulum/issues/844
This should be fixed with Pendulum 3.1