I am trying to pip install a dependency named fastrank that is currently installing on 2 different apple intel chip. However, when I try running it on two different mac's with M1 chips, I get the following error below:
***Collecting fastrank
Using cached fastrank-0.7.0.tar.gz (52 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [27 lines of output]
⚠️ Warning: Please use maturin in pyproject.toml with a version constraint, e.g. `requires = ["maturin>=0.12,<0.13"]`. This will become an error.
maturin failed
Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
Caused by: `cargo metadata` exited with an error: Updating crates.io index
warning: spurious network error (2 tries remaining): http parser error: stream ended at an unexpected time; class=Http (34)
warning: spurious network error (1 tries remaining): http parser error: stream ended at an unexpected time; class=Http (34)
error: failed to get `bzip2` as a dependency of package `fastrank v0.7.0 (/private/var/folders/5l/sppq3g8556nffpc74l_54zv40000gn/T/pip-install-ugbpj9al/fastrank_b60c765ae0df4f76b49d90ab4a21f9f2)`
Caused by:
failed to load source for dependency `bzip2`
Caused by:
Unable to update registry `crates-io`
Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
network failure seems to have happened
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
http parser error: stream ended at an unexpected time; class=Http (34)
Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/private/var/folders/5l/sppq3g8556nffpc74l_54zv40000gn/T/pip-modern-metadata-hdyh51_d', '--interpreter', '/Users/chinwekele/.pyenv/versions/3.7.13/bin/python3']' returned non-zero exit status 1.
Checking for Rust toolchain....
Running `maturin pep517 write-dist-info --metadata-directory /private/var/folders/5l/sppq3g8556nffpc74l_54zv40000gn/T/pip-modern-metadata-hdyh51_d --interpreter /Users/chinwekele/.pyenv/versions/3.7.13/bin/python3`
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Does anyone have any idea how to solve this error? I have tried using a Rosseta terminal, tried downloading and running various packages thinking they would help, but none has worked. Would appreciate a response.