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

Installing pydantic_core-2.13.0 with pip on Debian 11 #1065

Closed
mdierksen opened this issue Nov 8, 2023 · 4 comments · Fixed by #1068
Closed

Installing pydantic_core-2.13.0 with pip on Debian 11 #1065

mdierksen opened this issue Nov 8, 2023 · 4 comments · Fixed by #1068
Assignees

Comments

@mdierksen
Copy link

Trying to install pydantic_core-2.13.0 with pip on Debian 11 leads to following error:

Collecting pydantic_core
  Using cached pydantic_core-2.13.0.tar.gz (357 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
  ╰─> [6 lines of output]
      
      Cargo, the Rust package manager, is not installed or is not on PATH.
      This package requires Rust and Cargo to compile extensions. Install it through
      the system's package manager or via https://rustup.rs/
      
      Checking for Rust toolchain....
      [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.

The previous versions were installed fine. I did not need cargo before.

I installed cargo with apt from the Debian repo and now get the following error:

Collecting pydantic_core
  Using cached pydantic_core-2.13.0.tar.gz (357 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
  ╰─> [10 lines of output]
      error: failed to parse manifest at `/tmp/pip-install-i370odut/pydantic-core_98f141796ce441c6a7d0a2d77317e035/Cargo.toml`
      
      Caused by:
        invalid type: unit variant, expected string only for key `profile.bench.strip`
      💥 maturin failed
        Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
        Caused by: `cargo metadata` exited with an error:
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-_xm6iqs2', '--interpreter', '/usr/local/bin/python3.11']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-_xm6iqs2 --interpreter /usr/local/bin/python3.11`
      [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.

I guess the installed cargo version 0.47.0-3+b1 is older and does only accepts strings for 'strip'.

I have observed the same problem on Centos-7, Rocky-8 and Ubuntu 20.04.

@samuelcolvin
Copy link
Member

Great find @mdierksen, thank you so much.

@mdierksen
Copy link
Author

Always happy to help. Thank you for your work. :)

@davidhewitt
Copy link
Contributor

Should be restored in 2.14.1, just pushing now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants