1

Running requirements.txt installation for a project(Fast API). Ending up with below error. I have try approach from https://github.com/rust-lang/rust/issues/61925 and I have set up rust to "nightly" using rustup override set nightly still facing the error.

  Using cached orjson-3.4.3.tar.gz (1.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python@3.8/bin/python3.8 /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/c7/0n1qpwb16l55dfdwqs4xt97dhw2m6y/T/tmpwyr1rz66
         cwd: /private/var/folders/c7/0n1qpwb16l55dfdwqs4xt97dhw2m6y/T/pip-install-qmnttz7p/orjson
    Complete output (13 lines):
     maturin failed
      Caused by: Cargo metadata failed. Do you have cargo in your PATH?
      Caused by: Error during execution of `cargo metadata`: error: failed to run `rustc` to learn about target-specific information
    
    Caused by:
      process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Z mutable-noalias --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
      --- stderr
      error: the option `Z` is only accepted on the nightly compiler
    
    
    Checking for Rust toolchain....
    Running `maturin pep517 write-dist-info --metadata-directory /private/var/folders/c7/0n1qpwb16l55dfdwqs4xt97dhw2m6y/T/pip-modern-metadata-c1upg8fc --interpreter /usr/local/Cellar/python@3.8/3.8.6_2/bin/python3.8 --manylinux=off --strip=on`
    Error: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/private/var/folders/c7/0n1qpwb16l55dfdwqs4xt97dhw2m6y/T/pip-modern-metadata-c1upg8fc', '--interpreter', '/usr/local/Cellar/python@3.8/3.8.6_2/bin/python3.8', '--manylinux=off', '--strip=on']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python@3.8/bin/python3.8 /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/c7/0n1qpwb16l55dfdwqs4xt97dhw2m6y/T/tmpwyr1rz66 Check the logs for full command output.

Please advise! Thank you!

A8H1
  • 149
  • 4
  • 13
  • Can you provide the output of `rustup show`? – Ibraheem Ahmed Nov 30 '20 at 22:44
  • @IbraheemAhmed `$ rustup show` `Default host: x86_64-apple-darwin` `rustup home: /Users/user.name/.rustup` `installed toolchains` `--------------------` `stable-x86_64-apple-darwin (default)` `nightly-x86_64-apple-darwin` `active toolchain` `----------------` `nightly-x86_64-apple-darwin (directory override for /Users/user.name/Documents/workspace/dts-api-poc')` `rustc 1.50.0-nightly (1c389ffef 2020-11-24)` – A8H1 Nov 30 '20 at 23:35

1 Answers1

2

It seems like the error is with the maturin command using "Z" option which is only applicable in nightly compiler. you can first try to install

Install nightly toolchain:

rustup install nightly

Switch to nightly toolchain as default toolchain:

rustup default nightly

and then try to install those dependencies. Hope this works!!!!

  • ohhh, switching to `rustup default nightly` helped on my M1, thaaaanks --- Compiling marine-macro-impl v0.6.15 error[E0425]: cannot find function `get_fault_info` in this scope --> /Users/ivan/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmer-runtime-core-fl-0.17.1/src/fault.rs:289:21 | 289 | let fault = get_fault_info(siginfo as _, ucontext); | ^^^^^^^^^^^^^^ not found in this scope – Ivan Proskuryakov Feb 01 '22 at 22:33