Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message on installation with pip #11

Open
Robinlovelace opened this issue Dec 10, 2021 · 6 comments
Open

Error message on installation with pip #11

Robinlovelace opened this issue Dec 10, 2021 · 6 comments

Comments

@Robinlovelace
Copy link
Contributor

Heads-up @pkopparla I just tried to install the Python package with pip on my Ubuntu laptop. Very happy to say: it's clearly there and works 🎉 FYI I get this error message, this is not an error with the package but with my Rust installation that I've seen on other projects (most recently A/B Street) so will check in with Rust expert @dabreegster on resolving it. Opening this issue here in case other people hit the issue. Can't wait to give it a try!

pip install zonebuilder
Collecting zonebuilder
  Downloading zonebuilder-1.0.1.tar.gz (62 kB)
     |████████████████████████████████| 62 kB 778 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 /tmp/tmpgjedls6l prepare_metadata_for_build_wheel /tmp/tmpujcxvqeq
         cwd: /tmp/pip-install-nyex8wzl/zonebuilder
    Complete output (13 lines):
    💥 maturin failed
      Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
      Caused by: `cargo metadata` exited with an error: error: failed to parse manifest at `/tmp/pip-install-nyex8wzl/zonebuilder/Cargo.toml`
    
    Caused by:
      feature `edition2021` is required
    
      The package requires the Cargo feature called `edition2021`, but that feature is not stabilized in this version of Cargo (1.55.0 (32da73ab1 2021-08-23)).
      Consider trying a newer version of Cargo (this may require the nightly release).
      See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#edition-2021 for more information about the status of this feature.
    Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-a1wv99px', '--interpreter', '/usr/bin/python3']' returned non-zero exit status 1.
    Checking for Rust toolchain....
    Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-a1wv99px --interpreter /usr/bin/python3`
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmpgjedls6l prepare_metadata_for_build_wheel /tmp/tmpujcxvqeq Check the logs for full command output.
@Robinlovelace
Copy link
Contributor Author

I tried...

rustup update  
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2021-12-02, rust version 1.57.0 (f1edd0429 2021-11-29)

@Robinlovelace
Copy link
Contributor Author

And... It works!

pip install zonebuilder
Collecting zonebuilder
  Using cached zonebuilder-1.0.1.tar.gz (62 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done

    Preparing wheel metadata ... done
Building wheels for collected packages: zonebuilder
  Building wheel for zonebuilder (PEP 517) ... done
  Created wheel for zonebuilder: filename=zonebuilder-1.0.1-cp38-cp38-manylinux_2_24_x86_64.whl size=1025413 sha256=1b28d5404dae4b8b4de52d69aa8f6995152f5a8a16bd0ed234386873221a8721
  Stored in directory: /home/robin/.cache/pip/wheels/aa/ae/96/d4ca6e9fd8a7389a86c2fb2947875e035c6bc32f08bfff6253
Successfully built zonebuilder
Installing collected packages: zonebuilder
Successfully installed zonebuilder-1.0.1

@pkopparla
Copy link
Collaborator

Ah that's a bit worrying that it needs an up-to-date rust tool chain to install. I thought it'd work just with pure python. I'll check and see if there's something that can be changed.

@Robinlovelace
Copy link
Contributor Author

Robinlovelace commented Dec 10, 2021

No worries, I think it's just because I had an out of date Rust toolchain. I think we can close this issue. Just wanted to communicate my experience.

@michaelkirk
Copy link

Seems like you have long since updated your rust compiler, but also it seems like maybe maturin's dependency on 2021 edition has since been rolled back: PyO3/maturin#708 so that earlier rust versions might work.

@Robinlovelace
Copy link
Contributor Author

Aha, thanks @michaelkirk I will try again...

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

No branches or pull requests

3 participants