0

Preparing metadata (pyproject.toml): started remote: Preparing metadata (pyproject.toml): finished with status 'error' remote: error: subprocess-exited-with-error remote: remote: × Preparing metadata (pyproject.toml) did not run successfully. remote: │ exit code: 1 remote: ╰─> [6 lines of output] remote: Checking for Rust toolchain... remote: remote: Cargo, the Rust package manager, is not installed or is not on PATH. remote: This package requires Rust and Cargo to compile extensions. Install it through remote: the system's package manager or via https://rustup.rs/ remote: remote: [end of output] remote: remote: note: This error originates from a subprocess, and is likely not a problem with pip. remote: error: metadata-generation-failed remote: remote: × Encountered error while generating package metadata. remote: ╰─> See above for output. remote: remote: note: This is an issue with the package mentioned above, not pip. remote: hint: See above for details. remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed

torek
  • 448,244
  • 59
  • 642
  • 775
  • 1
    Seems pretty obvious: heroku is complaining that it's noticed that the project require rust, but you didn't mention rust in your requirements. – torek Aug 06 '22 at 13:23

1 Answers1

0

You're going to need to use multiple buildpacks, one for Rust and another for Python.

Rust is not officially supported, but several community options exist. Pick one, then configure your application:

  1. Set your application to use the Python buildpack:

    heroku buildpacks:set heroku/python
    
  2. Add your chosen Rust buildpack:

    heroku buildpacks:add --index 1 YOUR_CHOSEN_BUILDPACK
    
  3. Run heroku buildpacks to ensure they are correct. You should see the Rust buildpack first, and the Python buildpack second.

  4. Finally, redeploy your application.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257