maturin: Can't compile using `maturin develop` on macOS(M2 chip)

Bug Description

I tried follow up the example(string_num) in https://github.com/PyO3/pyo3. It shows a bunch of errors when I run maturin develop. Here is a screenshot of the error, not all of them.

image

The most important information here is x86_64-apple-darwin, why the compile target is x86_64-apple-darwin? I run those code on macOS with M2 chip, the target should be aarch64-apple-darwin.

BTW, I also tried maturin develop --target aarch64-apple-darwin, unfortunately, it doesn’t work.

Your Python version (python -V)

Python 3.8.9

Your pip version (pip -V)

pip 22.1.2

What bindings you’re using

pyo3

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren’t accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

https://github.com/PyO3/pyo3#using-rust-from-python

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (11 by maintainers)

Most upvoted comments

Closing because I can’t not reproduce this issue, @dzvon feel free to reopen if you have more detailed steps (include how did you install Python/Rust etc.) to reproduce this issue.