Skip to content

Conversation

matthewhaynesonline
Copy link
Contributor

I added a quick note to the Homebrew section of the install guides to mention it could cause conflicts with rustup. For background, I ran into this on MacOS causing conflicts with cross compiling with cross.rs:

  1. Installed Rust with rustup
  2. Setup cross.rs (with cargo) and added toolchains for x86 linux (was able to cross compile)
  3. Decided to try maturin and installed with homebrew
    • This installed another version of rustc alongside the version that rustup installed
  4. cross would then fail to cross compile because it would look for the toolchains with the homebrew rust even though rustup was installed
  5. I then uninstalled maturin and rust with homebrew, compiled maturin from source and that solved the issues (as there would only be one rust install).
$ which rustup
/Users/$HOME/.cargo/bin/rustup

$ rustc --version
rustc 1.86.0 (05f9846f8 2025-03-31) (Homebrew)

$ which rustc
/opt/homebrew/bin/rustc 

This is the same MR as #2604, I just renamed and squashed my branch so the original MR was closed.

Add a note about Homebrew installation conflicts with rustup.
@messense messense marked this pull request as ready for review May 17, 2025 07:56
@messense messense merged commit be9db37 into PyO3:main May 17, 2025
6 checks passed
@messense
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants